[fix] delete custom field tax_id if exists in trasaction Sales Order, Sales Invoice and Delivery Note
This commit is contained in:
parent
71ba7ea717
commit
07913c3ff2
@ -12,9 +12,16 @@ def execute():
|
||||
|
||||
if frappe.db.get_single_value('System Settings', 'country')=='India':
|
||||
from erpnext.regional.india.setup import setup
|
||||
delete_custom_field_tax_id_if_exists()
|
||||
setup(patch=True)
|
||||
send_gst_update_email()
|
||||
|
||||
def delete_custom_field_tax_id_if_exists():
|
||||
for field in frappe.db.sql_list("""select name from `tabCustom Field` where fieldname='tax_id'
|
||||
and dt in ('Sales Order', 'Salse Invoice', 'Delivery Note')"""):
|
||||
frappe.delete_doc("Custom Field", field, ignore_permissions=True)
|
||||
frappe.db.commit()
|
||||
|
||||
def send_gst_update_email():
|
||||
message = """Hello,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user