From 57c861efc3f37bc0ea55ddce620e94221f5007e8 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Mon, 20 May 2019 13:08:18 +0530 Subject: [PATCH] feat: add patch to create custom fields for india specific client --- erpnext/patches.txt | 5 +++-- .../v12_0/make_custom_fields_for_bank_remittance.py | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 erpnext/patches/v12_0/make_custom_fields_for_bank_remittance.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index fce848ab5f..accdeeea35 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -568,7 +568,7 @@ execute:frappe.delete_doc_if_exists("Page", "sales-analytics") execute:frappe.delete_doc_if_exists("Page", "purchase-analytics") execute:frappe.delete_doc_if_exists("Page", "stock-analytics") execute:frappe.delete_doc_if_exists("Page", "production-analytics") -erpnext.patches.v11_0.ewaybill_fields_gst_india #2019-05-06 +erpnext.patches.v11_0.ewaybill_fields_gst_india #2019-05-01 erpnext.patches.v11_0.drop_column_max_days_allowed erpnext.patches.v10_0.update_user_image_in_employee erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items @@ -600,4 +600,5 @@ erpnext.patches.v11_1.woocommerce_set_creation_user erpnext.patches.v11_1.set_salary_details_submittable erpnext.patches.v11_1.rename_depends_on_lwp execute:frappe.delete_doc("Report", "Inactive Items") -erpnext.patches.v11_1.delete_scheduling_tool \ No newline at end of file +erpnext.patches.v11_1.delete_scheduling_tool +erpnext.patches.v12_0.make_custom_fields_for_bank_remittance \ No newline at end of file diff --git a/erpnext/patches/v12_0/make_custom_fields_for_bank_remittance.py b/erpnext/patches/v12_0/make_custom_fields_for_bank_remittance.py new file mode 100644 index 0000000000..9925b70a96 --- /dev/null +++ b/erpnext/patches/v12_0/make_custom_fields_for_bank_remittance.py @@ -0,0 +1,10 @@ +from __future__ import unicode_literals +import frappe +from erpnext.regional.india.setup import make_custom_fields + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'India'}) + if not company: + return + + make_custom_fields() \ No newline at end of file