Merge pull request #20034 from rohitwaghchaure/fixed_patch_for_add_export_type_field_in_party_master

fix: patch
This commit is contained in:
Deepesh Garg 2019-12-21 17:20:09 +05:30 committed by GitHub
commit 1faef279cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,8 @@ def execute():
tax_category = inter_state_category.name
for doctype in ('Sales Taxes and Charges Template', 'Purchase Taxes and Charges Template'):
if not frappe.get_meta(doctype).has_field('is_inter_state'): continue
template = frappe.db.get_value(doctype, {'is_inter_state': 1, 'disabled': 0}, ['name'])
if template:
frappe.db.set_value(doctype, template, 'tax_category', tax_category)