[fix] schools patch

This commit is contained in:
Rushabh Mehta 2016-07-21 18:22:58 +05:30
parent 7e472f898d
commit d4f3c6b5e7

View File

@ -6,6 +6,12 @@ def execute():
if 'schools' in frappe.get_installed_apps(): if 'schools' in frappe.get_installed_apps():
frappe.get_doc('Portal Settings', 'Portal Settings').sync_menu() frappe.get_doc('Portal Settings', 'Portal Settings').sync_menu()
frappe.db.sql("""delete from `tabDesktop Icon`""") 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'""") frappe.db.sql("""update `tabDocType` set module='Schools' where module='Academics'""")
from frappe.installer import remove_from_installed_apps from frappe.installer import remove_from_installed_apps
remove_from_installed_apps("schools") remove_from_installed_apps("schools")