Merge branch 'develop' into fix-cancel-jv

This commit is contained in:
Saqib Ansari
2022-01-21 12:25:30 +05:30
committed by GitHub
104 changed files with 219 additions and 4875 deletions

View File

@@ -0,0 +1,10 @@
import click
def execute():
click.secho(
"Hospitality domain is moved to a separate app and will be removed from ERPNext in version-14.\n"
"When upgrading to ERPNext version-14, please install the app to continue using the Hospitality domain: https://github.com/frappe/hospitality",
fg="yellow",
)

View File

@@ -0,0 +1,32 @@
import frappe
def execute():
modules = ['Hotels', 'Restaurant']
for module in modules:
frappe.delete_doc("Module Def", module, ignore_missing=True, force=True)
frappe.delete_doc("Workspace", module, ignore_missing=True, force=True)
reports = frappe.get_all("Report", {"module": module, "is_standard": "Yes"}, pluck='name')
for report in reports:
frappe.delete_doc("Report", report, ignore_missing=True, force=True)
dashboards = frappe.get_all("Dashboard", {"module": module, "is_standard": 1}, pluck='name')
for dashboard in dashboards:
frappe.delete_doc("Dashboard", dashboard, ignore_missing=True, force=True)
doctypes = frappe.get_all("DocType", {"module": module, "custom": 0}, pluck='name')
for doctype in doctypes:
frappe.delete_doc("DocType", doctype, ignore_missing=True)
custom_fields = [
{"dt": "Sales Invoice", "fieldname": "restaurant"},
{"dt": "Sales Invoice", "fieldname": "restaurant_table"},
{"dt": "Price List", "fieldname": "restaurant_menu"},
]
for field in custom_fields:
custom_field = frappe.db.get_value("Custom Field", field)
frappe.delete_doc("Custom Field", custom_field, ignore_missing=True)