From 32128e82f3542f095a247d29c5c3697276672e1e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 2 Oct 2012 13:25:20 +0530 Subject: [PATCH] account on_trash fix --- erpnext/accounts/doctype/account/account.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 79ca322cac..7b71bae83c 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -260,11 +260,8 @@ class DocType: def on_trash(self): # Check balance before trash self.check_balance_before_trash() + self.update_nsm_model() - # rebuild tree - from webnotes.utils.nestedset import update_remove_node - update_remove_node('Account', self.doc.name) - # delete all cancelled gl entry of this account sql("delete from `tabGL Entry` where account = %s and ifnull(is_cancelled, 'No') = 'Yes'", self.doc.name)