From 5919d81e08c1e4fbf61c6422b182401e05e40131 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 17 May 2024 20:43:19 +0530 Subject: [PATCH] refactor: ignore internal doctypes on Dunning cancellation --- erpnext/accounts/doctype/dunning/dunning.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/dunning/dunning.py b/erpnext/accounts/doctype/dunning/dunning.py index 260ede57c4..36c517a478 100644 --- a/erpnext/accounts/doctype/dunning/dunning.py +++ b/erpnext/accounts/doctype/dunning/dunning.py @@ -148,7 +148,19 @@ class Dunning(AccountsController): def on_cancel(self): super().on_cancel() - self.ignore_linked_doctypes = ["GL Entry"] + self.ignore_linked_doctypes = [ + "GL Entry", + "Stock Ledger Entry", + "Repost Item Valuation", + "Repost Payment Ledger", + "Repost Payment Ledger Items", + "Repost Accounting Ledger", + "Repost Accounting Ledger Items", + "Unreconcile Payment", + "Unreconcile Payment Entries", + "Payment Ledger Entry", + "Serial and Batch Bundle", + ] def resolve_dunning(doc, state): -- GitLab