mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
fix: remove more India patches
This commit is contained in:
@@ -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()
|
||||
@@ -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'
|
||||
"""
|
||||
)
|
||||
Reference in New Issue
Block a user