From a10b52c6e68fd02dd5759963b06e9628cb4b2115 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 23 Oct 2015 13:02:49 +0530 Subject: [PATCH] Don't delete tax template and pos profile while deleting company transactions --- .../setup/doctype/company/delete_company_transactions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/company/delete_company_transactions.py b/erpnext/setup/doctype/company/delete_company_transactions.py index f7334b1e6d..ba2a5b83f5 100644 --- a/erpnext/setup/doctype/company/delete_company_transactions.py +++ b/erpnext/setup/doctype/company/delete_company_transactions.py @@ -22,8 +22,10 @@ def delete_company_transactions(company_name): for doctype in frappe.db.sql_list("""select parent from tabDocField where fieldtype='Link' and options='Company'"""): - if doctype not in ("Account", "Cost Center", "Warehouse", "Budget Detail", "Party Account", "Employee"): - delete_for_doctype(doctype, company_name) + if doctype not in ("Account", "Cost Center", "Warehouse", "Budget Detail", + "Party Account", "Employee", "Sales Taxes and Charges Template", + "Purchase Taxes and Charges Template", "POS Profile"): + delete_for_doctype(doctype, company_name) # Clear notification counts clear_notifications()