patch: remove related docs and warn

This commit is contained in:
Smit Vora 2022-06-24 21:59:28 +05:30
parent b6133c300e
commit 8fb0997cf1
3 changed files with 55 additions and 0 deletions

View File

@ -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

View File

@ -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",
)

View File

@ -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",
)