From 5ee5d4329547d374278ddfd45bf2f890bccf0013 Mon Sep 17 00:00:00 2001 From: Zarrar Date: Thu, 7 Dec 2017 17:16:59 +0530 Subject: [PATCH] ontrash of nestedset wasn't ideal for employee's usecase (#11876) --- erpnext/hr/doctype/employee/employee.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py index 7c9c11295e..9541b775a1 100755 --- a/erpnext/hr/doctype/employee/employee.py +++ b/erpnext/hr/doctype/employee/employee.py @@ -159,7 +159,7 @@ class Employee(NestedSet): throw(_("Employee cannot report to himself.")) def on_trash(self): - super(Employee, self).on_trash() + self.update_nsm_model() delete_events(self.doctype, self.name) def validate_prefered_email(self):