From 369afce43cdd6918861e5b1fc89980b82b0d57c2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 26 Apr 2018 10:10:03 +0530 Subject: [PATCH] [patch] ignore validations while creating custom fields for gst via patch --- erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py | 1 + erpnext/regional/india/setup.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py b/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py index fc197ad9be..0fdf0b989c 100644 --- a/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py +++ b/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py @@ -6,4 +6,5 @@ import frappe def execute(): frappe.reload_doc("agriculture", "doctype", "land_unit") for dt in ("Account", "Cost Center", "File", "Employee", "Land Unit", "Task", "Customer Group", "Sales Person", "Territory"): + frappe.reload_doctype(dt) frappe.get_doc("DocType", dt).run_module_method("on_doctype_update") \ No newline at end of file diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index 218df51db2..0073d3311c 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -183,11 +183,11 @@ def make_custom_fields(): 'Purchase Invoice Item': [hsn_sac_field], 'Employee': [ dict(fieldname='ifsc_code', label='IFSC Code', - fieldtype='Data', insert_after='bank_ac_no', print_hide=1, + fieldtype='Data', insert_after='bank_ac_no', print_hide=1, depends_on='eval:doc.salary_mode == "Bank"') ] } - create_custom_fields(custom_fields) + create_custom_fields(custom_fields, ignore_validate = frappe.flags.in_patch) def make_fixtures(): docs = [