From f276b52af3c8c8a389c81923a53e1afae4811754 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 22 Jul 2016 11:31:31 +0530 Subject: [PATCH] [fix] patch #5831 --- erpnext/patches/v7_0/migrate_schools_to_erpnext.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/erpnext/patches/v7_0/migrate_schools_to_erpnext.py b/erpnext/patches/v7_0/migrate_schools_to_erpnext.py index 4d8dd1e6684..d792d005470 100644 --- a/erpnext/patches/v7_0/migrate_schools_to_erpnext.py +++ b/erpnext/patches/v7_0/migrate_schools_to_erpnext.py @@ -3,6 +3,14 @@ import frappe from erpnext.setup.setup_wizard import domainify def execute(): + for name in ('student', 'student_group', 'course_schedule', 'student_attendance', + 'course', 'program', 'student_applicant', 'examination', 'fees', 'instructor'): + frappe.reload_doc('schools', 'doctype', name) + + frappe.reload_doc('website', 'doctype', 'portal_settings') + frappe.reload_doc('website', 'doctype', 'portal_menu_item') + frappe.reload_doc('buying', 'doctype', 'request_for_quotation') + if 'schools' in frappe.get_installed_apps(): frappe.get_doc('Portal Settings', 'Portal Settings').sync_menu() frappe.db.sql("""delete from `tabDesktop Icon`""") @@ -17,9 +25,5 @@ def execute(): remove_from_installed_apps("schools") domainify.setup_domain('Education') else: - frappe.reload_doc('schools', 'doctype', 'announcement') - frappe.reload_doc('schools', 'doctype', 'course') - frappe.reload_doc('schools', 'doctype', 'fees') - frappe.reload_doc('schools', 'doctype', 'examination') frappe.get_doc('Portal Settings', 'Portal Settings').sync_menu() domainify.setup_sidebar_items(domainify.get_domain('Manufacturing'))