Set corrected states list in GST State field's options

This commit is contained in:
Nabin Hait 2017-07-12 16:01:24 +05:30
parent 0a32b7a6eb
commit 7312186c76
6 changed files with 13 additions and 7 deletions

View File

@ -82,7 +82,6 @@ def set_address_details(out, party, party_type, doctype=None, company=None):
if out.company_address:
out.update(get_fetch_values(doctype, 'company_address', out.company_address))
def set_contact_details(out, party, party_type):
out.contact_person = get_default_contact(party_type, party.name)

View File

@ -416,3 +416,4 @@ erpnext.patches.v8_1.gst_fixes #2017-07-06
erpnext.patches.v8_0.update_production_orders
erpnext.patches.v8_1.remove_sales_invoice_from_returned_serial_no
erpnext.patches.v8_1.allow_invoice_copy_to_edit_after_submit
erpnext.patches.v8_1.update_gst_state

View File

@ -0,0 +1,6 @@
import frappe
from erpnext.regional.india import states
def execute():
frappe.db.sql("update `tabCustom Field` set options=%s where fieldname='gst_state'", '\n'.join(states))
frappe.db.sql("update `tabAddress` set gst_state='Chhattisgarh' where gst_state='Chattisgarh'")

View File

@ -26,6 +26,7 @@ states = [
'Mizoram',
'Nagaland',
'Odisha',
'Other Territory',
'Pondicherry',
'Punjab',
'Rajasthan',

View File

@ -388,7 +388,6 @@ def make_sales_invoice(source_name, target_doc=None):
if target.company_address:
target.update(get_fetch_values("Sales Invoice", 'company_address', target.company_address))
def update_item(source_doc, target_doc, source_parent):
target_doc.qty = source_doc.qty - invoiced_qty_map.get(source_doc.name, 0)