From d4f3c6b5e74cc3ddddbaa574cf012d665f6d286a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 21 Jul 2016 18:22:58 +0530 Subject: [PATCH] [fix] schools patch --- erpnext/patches/v7_0/migrate_schools_to_erpnext.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/patches/v7_0/migrate_schools_to_erpnext.py b/erpnext/patches/v7_0/migrate_schools_to_erpnext.py index 6919eec557..4d8dd1e668 100644 --- a/erpnext/patches/v7_0/migrate_schools_to_erpnext.py +++ b/erpnext/patches/v7_0/migrate_schools_to_erpnext.py @@ -6,6 +6,12 @@ def execute(): if 'schools' in frappe.get_installed_apps(): frappe.get_doc('Portal Settings', 'Portal Settings').sync_menu() frappe.db.sql("""delete from `tabDesktop Icon`""") + if not frappe.db.exists('Module Def', 'Schools'): + frappe.get_doc({ + 'doctype': 'Module Def', + 'module_name': 'Schools', + 'app_name': 'erpnext' + }).insert() frappe.db.sql("""update `tabDocType` set module='Schools' where module='Academics'""") from frappe.installer import remove_from_installed_apps remove_from_installed_apps("schools")