diff --git a/erpnext/patches/v10_0/gst_hsn_fixes.py b/erpnext/patches/v10_0/gst_hsn_fixes.py index 7a65ef3c08f..98cf0a7a2da 100644 --- a/erpnext/patches/v10_0/gst_hsn_fixes.py +++ b/erpnext/patches/v10_0/gst_hsn_fixes.py @@ -3,6 +3,10 @@ from erpnext.regional.india.setup import setup from frappe.custom.doctype.custom_field.custom_field import create_custom_fields def execute(): + company = frappe.get_all('Company', filters = {'country': 'India'}) + if not company: + return + hsn_sac_field = dict(fieldname='gst_hsn_code', label='HSN/SAC', fieldtype='Data', options='item_code.gst_hsn_code', insert_after='description', allow_on_submit=1, print_hide=1) @@ -11,4 +15,4 @@ def execute(): 'Material Request Item': [hsn_sac_field] } - create_custom_fields(custom_fields) \ No newline at end of file + create_custom_fields(custom_fields)