From ac1ce5d2057cba4adc15c3b6cc56b1c03788cf41 Mon Sep 17 00:00:00 2001 From: Himanshu Date: Sat, 4 May 2019 22:43:37 +0530 Subject: [PATCH] fix: Remove Scheduling Tool if exists (#17473) * fix: scheduling tool * fix: patch for scheduling tool * fix: remve drop table --- erpnext/patches.txt | 1 + erpnext/patches/v11_1/delete_scheduling_tool.py | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 erpnext/patches/v11_1/delete_scheduling_tool.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 97ad26e0839..01270e47797 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -600,3 +600,4 @@ erpnext.patches.v11_1.woocommerce_set_creation_user erpnext.patches.v11_1.set_salary_details_submittable erpnext.patches.v11_1.rename_depends_on_lwp execute:frappe.delete_doc("Report", "Inactive Items") +erpnext.patches.v11_1.delete_scheduling_tool diff --git a/erpnext/patches/v11_1/delete_scheduling_tool.py b/erpnext/patches/v11_1/delete_scheduling_tool.py new file mode 100644 index 00000000000..b7ad28a3fd6 --- /dev/null +++ b/erpnext/patches/v11_1/delete_scheduling_tool.py @@ -0,0 +1,9 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + if frappe.db.exists("DocType", "Scheduling Tool"): + frappe.delete_doc("DocType", "Scheduling Tool", ignore_permissions=True)