fix: remove more India patches

This commit is contained in:
Sagar Vora
2022-06-24 14:14:12 +05:30
parent ff10f557c0
commit 2e6919b7be
6 changed files with 0 additions and 93 deletions

View File

@@ -1,19 +0,0 @@
import frappe
from erpnext.regional.india import states
def execute():
company = frappe.get_all("Company", filters={"country": "India"})
if not company:
return
custom_fields = ["Address-gst_state", "Tax Category-gst_state"]
# Update options in gst_state custom fields
for field in custom_fields:
if frappe.db.exists("Custom Field", field):
gst_state_field = frappe.get_doc("Custom Field", field)
gst_state_field.options = "\n".join(states)
gst_state_field.save()

View File

@@ -1,26 +0,0 @@
import frappe
from erpnext.regional.india import states
def execute():
company = frappe.get_all("Company", filters={"country": "India"})
if not company:
return
# Update options in gst_state custom field
gst_state = frappe.get_doc("Custom Field", "Address-gst_state")
gst_state.options = "\n".join(states)
gst_state.save()
# Update gst_state and state code in existing address
frappe.db.sql(
"""
UPDATE `tabAddress`
SET
gst_state = 'Dadra and Nagar Haveli and Daman and Diu',
gst_state_number = 26
WHERE gst_state = 'Daman and Diu'
"""
)