mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
account on_trash fix
This commit is contained in:
@@ -260,10 +260,7 @@ class DocType:
|
|||||||
def on_trash(self):
|
def on_trash(self):
|
||||||
# Check balance before trash
|
# Check balance before 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
|
# 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)
|
sql("delete from `tabGL Entry` where account = %s and ifnull(is_cancelled, 'No') = 'Yes'", self.doc.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user