From 1b36336fc336486c5701233e19d3ebeefe35fe7d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 7 Jul 2017 14:05:33 +0530 Subject: [PATCH 1/2] Added new option in invoice_copy, made state_number read_only (#9695) * Added new option in invoice_copy, made state_number read_only * removed the trailing whitespace --- .../v8_1/allow_invoice_copy_to_edit_after_submit.py | 12 ++++++++++++ erpnext/regional/india/setup.py | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py diff --git a/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py b/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py new file mode 100644 index 000000000000..1fb297f2886b --- /dev/null +++ b/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py @@ -0,0 +1,12 @@ +import frappe + +def execute(): + inv_copy_options = "ORIGINAL FOR RECIPIENT\nDUPLICATE FOR TRANSPORTER\nDUPLICATE FOR SUPPLIER\nTRIPLICATE FOR SUPPLIER" + + frappe.db.sql("""update `tabCustom Field` set allow_on_submit=1, options=%s + where fieldname='invoice_copy' and dt = 'Sales Invoice' + """, inv_copy_options) + + frappe.db.sql("""update `tabCustom Field` set read_only=1 + where fieldname='gst_state_number' and dt = 'Address' + """) diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index 0aefc7b22e7a..93aea0dfcc0e 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -84,7 +84,7 @@ def make_custom_fields(): dict(fieldname='gst_state', label='GST State', fieldtype='Select', options='\n'.join(states), insert_after='gstin'), dict(fieldname='gst_state_number', label='GST State Number', - fieldtype='Int', insert_after='gst_state'), + fieldtype='Int', insert_after='gst_state', read_only=1), ], 'Purchase Invoice': [ dict(fieldname='supplier_gstin', label='Supplier GSTIN', @@ -103,7 +103,7 @@ def make_custom_fields(): options='company_address.gstin', print_hide=1), dict(fieldname='invoice_copy', label='Invoice Copy', fieldtype='Select', insert_after='project', print_hide=1, allow_on_submit=1, - options='ORIGINAL FOR RECIPIENT\nDUPLICATE FOR TRANSPORTER\nTRIPLICATE FOR SUPPLIER') + options='ORIGINAL FOR RECIPIENT\nDUPLICATE FOR TRANSPORTER\nDUPLICATE FOR SUPPLIER\nTRIPLICATE FOR SUPPLIER') ], 'Item': [ dict(fieldname='gst_hsn_code', label='HSN/SAC', From 5cf3868d03963ffb51fe01f451b19f937dd6f1bc Mon Sep 17 00:00:00 2001 From: mbauskar Date: Fri, 7 Jul 2017 14:36:45 +0600 Subject: [PATCH 2/2] bumped to version 8.3.3 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 913b372556df..5ba4160497d5 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '8.3.2' +__version__ = '8.3.3' def get_default_company(user=None): '''Get default company for user'''