Set corrected states list in GST State field's options
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index ba0f0d3..bf509de 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -81,7 +81,6 @@
out.update(get_company_address(company))
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)
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index d833638..3d4d24e 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -415,4 +415,5 @@
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
\ No newline at end of file
+erpnext.patches.v8_1.allow_invoice_copy_to_edit_after_submit
+erpnext.patches.v8_1.update_gst_state
\ No newline at end of file
diff --git a/erpnext/patches/v8_1/update_gst_state.py b/erpnext/patches/v8_1/update_gst_state.py
new file mode 100644
index 0000000..2bbb6b8
--- /dev/null
+++ b/erpnext/patches/v8_1/update_gst_state.py
@@ -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'")
diff --git a/erpnext/regional/india/__init__.py b/erpnext/regional/india/__init__.py
index de5f1ab..4a9a211 100644
--- a/erpnext/regional/india/__init__.py
+++ b/erpnext/regional/india/__init__.py
@@ -26,6 +26,7 @@
'Mizoram',
'Nagaland',
'Odisha',
+ 'Other Territory',
'Pondicherry',
'Punjab',
'Rajasthan',
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 2df52ac..4333fd8 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -504,12 +504,12 @@
target.flags.ignore_permissions = True
target.run_method("set_missing_values")
target.run_method("calculate_taxes_and_totals")
-
+
# set company address
target.update(get_company_address(target.company))
if target.company_address:
target.update(get_fetch_values("Sales Invoice", 'company_address', target.company_address))
-
+
def update_item(source, target, source_parent):
target.amount = flt(source.amount) - flt(source.billed_amt)
target.base_amount = target.amount * flt(source_parent.conversion_rate)
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 3bf0384..5c5f0f8 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -382,12 +382,11 @@
frappe.throw(_("All these items have already been invoiced"))
target.run_method("calculate_taxes_and_totals")
-
+
# set company address
target.update(get_company_address(target.company))
if target.company_address:
- target.update(get_fetch_values("Sales Invoice", 'company_address', 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)