fix: delete taxes and charges template while deleting company

This commit is contained in:
Nabin Hait 2019-01-25 11:04:14 +05:30
parent 2a1aedfff1
commit ddc65dfb87

View File

@ -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)