brotherton-erpnext/erpnext/patches/v14_0/remove_india_localisation.py

56 lines
1.1 KiB
Python
Raw Normal View History

2022-06-24 16:29:28 +00:00
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",
"HSN Tax Rate",
2022-06-24 16:29:28 +00:00
"GST Settings",
"GSTR 3B Report",
],
"Print Format": [
"GST E-Invoice",
"GST Purchase Invoice",
"GST Tax Invoice",
2022-06-26 13:06:00 +00:00
"GST POS Invoice",
2022-06-24 16:29:28 +00:00
],
"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():
2022-06-26 13:00:54 +00:00
frappe.delete_doc(
doctype,
names,
force=True,
ignore_permissions=True,
ignore_missing=True,
)
if not frappe.db.exists("Company", {"country": "India"}):
return
2022-06-24 16:29:28 +00:00
click.secho(
2022-06-26 13:00:54 +00:00
"India-specific regional features have been moved to a separate app."
" Please install India Compliance to continue using these features:"
" https://github.com/resilient-tech/india-compliance",
2022-06-24 16:29:28 +00:00
fg="yellow",
)