Merge pull request #17149 from hrwX/gst_patch

fix(India): run patch for GST custom fields
This commit is contained in:
Nabin Hait
2019-05-03 09:26:04 +05:30
committed by GitHub
2 changed files with 20 additions and 1 deletions

View File

@@ -508,4 +508,5 @@ erpnext.patches.v10_0.recalculate_gross_margin_for_project
erpnext.patches.v10_0.delete_hub_documents
erpnext.patches.v10_0.update_user_image_in_employee
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
erpnext.patches.v10_0.allow_operators_in_supplier_scorecard
erpnext.patches.v10_0.allow_operators_in_supplier_scorecard
erpnext.patches.v10_0.gst_hsn_fixes

View File

@@ -0,0 +1,18 @@
import frappe
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)
custom_fields = {
'Material Request Item': [hsn_sac_field]
}
create_custom_fields(custom_fields)