From ddc65dfb872053e507b63d00c146cf475eec1bd2 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 25 Jan 2019 11:04:14 +0530 Subject: [PATCH] fix: delete taxes and charges template while deleting company --- erpnext/setup/doctype/company/company.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 20b1201269..c49c264251 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -339,6 +339,9 @@ class Company(NestedSet): frappe.db.sql("delete from tabDepartment where company=%s", self.name) frappe.db.sql("delete from `tabTax Withholding Account` where company=%s", self.name) + frappe.db.sql("delete from `tabSales Taxes and Charges Template` where company=%s", self.name) + frappe.db.sql("delete from `tabPurchase Taxes and Charges Template` where company=%s", self.name) + @frappe.whitelist() def enqueue_replace_abbr(company, old, new): kwargs = dict(company=company, old=old, new=new)