diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1ce5c31919..d877cf5919 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -302,6 +302,7 @@ erpnext.patches.v13_0.delete_bank_reconciliation_detail erpnext.patches.v13_0.enable_provisional_accounting erpnext.patches.v13_0.non_profit_deprecation_warning erpnext.patches.v13_0.enable_ksa_vat_docs #1 +erpnext.patches.v13_0.remove_india_deprecation_warning [post_model_sync] execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings') @@ -344,3 +345,4 @@ execute:frappe.delete_doc("DocType", "Naming Series") erpnext.patches.v13_0.set_payroll_entry_status erpnext.patches.v13_0.job_card_status_on_hold erpnext.patches.v14_0.migrate_gl_to_payment_ledger +erpnext.patches.v14_0.delete_regional_india_doctypes diff --git a/erpnext/patches/v13_0/remove_india_deprecation_warning.py b/erpnext/patches/v13_0/remove_india_deprecation_warning.py new file mode 100644 index 0000000000..006587f0d9 --- /dev/null +++ b/erpnext/patches/v13_0/remove_india_deprecation_warning.py @@ -0,0 +1,10 @@ +import click + + +def execute(): + + click.secho( + "Regional India is moved to a separate app and will be removed from ERPNext in version-14.\n" + "Please install the app to continue using the module after upgrading to version-14: https://github.com/resilient-tech/india-compliance", + fg="yellow", + ) diff --git a/erpnext/patches/v14_0/delete_regional_india_doctypes.py b/erpnext/patches/v14_0/delete_regional_india_doctypes.py new file mode 100644 index 0000000000..f3e702057a --- /dev/null +++ b/erpnext/patches/v14_0/delete_regional_india_doctypes.py @@ -0,0 +1,43 @@ +import click +import frappe + + +def execute(): + to_delete = { + "DocType": [ + "C-Form", + "C-Form Invoice Detail", + "GST Account", + "E Invoice Request Log", + "E Invoice Settings", + "E Invoice User", + "GST HSN Code", + "GST Settings", + "GSTR 3B Report", + ], + "Print Format": [ + "GST E-Invoice", + "GST Purchase Invoice", + "GST Tax Invoice", + ], + "Report": [ + "E-Invoice Summary", + "Eway Bill", + "GST Itemised Purchase Register", + "GST Itemised Sales Register", + "GST Purchase Register", + "GST Sales Register", + "GSTR-1", + "GSTR-2", + "HSN-wise-summary of outward supplies", + ], + } + + for doctype, names in to_delete.items(): + frappe.delete_doc(doctype, names, ignore_missing=True, force=True) + + click.secho( + "Regional India is moved to a separate app and is removed from ERPNext.\n" + "Please install the app to continue using the module: https://github.com/resilient-tech/india-compliance", + fg="yellow", + )