[minor] dont make tax template default, by default. #5695

This commit is contained in:
Rushabh Mehta 2016-07-19 10:17:30 +05:30
parent 5f9566f3af
commit 6ecc0888ab

View File

@ -12,8 +12,9 @@ class SalesTaxesandChargesTemplate(Document):
valdiate_taxes_and_charges_template(self)
def valdiate_taxes_and_charges_template(doc):
if not doc.is_default and not frappe.get_all(doc.doctype, filters={"is_default": 1}):
doc.is_default = 1
# default should not be disabled
# if not doc.is_default and not frappe.get_all(doc.doctype, filters={"is_default": 1}):
# doc.is_default = 1
if doc.is_default == 1:
frappe.db.sql("""update `tab{0}` set is_default = 0