mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 13:39:18 +00:00
[minor] dont make tax template default, by default. #5695
This commit is contained in:
@@ -12,8 +12,9 @@ class SalesTaxesandChargesTemplate(Document):
|
|||||||
valdiate_taxes_and_charges_template(self)
|
valdiate_taxes_and_charges_template(self)
|
||||||
|
|
||||||
def valdiate_taxes_and_charges_template(doc):
|
def valdiate_taxes_and_charges_template(doc):
|
||||||
if not doc.is_default and not frappe.get_all(doc.doctype, filters={"is_default": 1}):
|
# default should not be disabled
|
||||||
doc.is_default = 1
|
# 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:
|
if doc.is_default == 1:
|
||||||
frappe.db.sql("""update `tab{0}` set is_default = 0
|
frappe.db.sql("""update `tab{0}` set is_default = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user