Merge branch 'develop' into patch-4

This commit is contained in:
Ankush Menat 2022-06-02 10:25:20 +05:30 committed by GitHub
commit 849a2dc349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1866,7 +1866,7 @@ def get_default_taxes_and_charges(master_doctype, tax_template=None, company=Non
def get_taxes_and_charges(master_doctype, master_name):
if not master_name:
return
from frappe.model import default_fields
from frappe.model import child_table_fields, default_fields
tax_master = frappe.get_doc(master_doctype, master_name)
@ -1874,7 +1874,7 @@ def get_taxes_and_charges(master_doctype, master_name):
for i, tax in enumerate(tax_master.get("taxes")):
tax = tax.as_dict()
for fieldname in default_fields:
for fieldname in default_fields + child_table_fields:
if fieldname in tax:
del tax[fieldname]