brotherton-erpnext/erpnext/patches/v7_0/set_portal_settings.py

29 lines
862 B
Python
Raw Normal View History

2016-08-09 17:07:59 +05:30
# 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():
2016-12-19 13:15:52 +05:30
frappe.reload_doctype('Role')
2017-01-30 17:04:38 +05:30
for dt in ("assessment", "course", "fees"):
# 'Schools' module changed to the 'Education'
# frappe.reload_doc("schools", "doctype", dt)
frappe.reload_doc("education", "doctype", dt)
2016-10-07 16:53:07 +05:30
for dt in ("domain", "has_domain", "domain_settings"):
frappe.reload_doc("core", "doctype", dt)
2016-10-07 14:54:28 +05:30
frappe.reload_doc('website', 'doctype', 'portal_menu_item')
2016-10-07 16:53:07 +05:30
2016-08-09 17:07:59 +05:30
frappe.get_doc('Portal Settings').sync_menu()
2016-12-19 13:15:52 +05:30
2016-08-09 17:07:59 +05:30
if 'schools' in frappe.get_installed_apps():
domain = frappe.get_doc('Domain', 'Education')
domain.setup_domain()
2016-08-09 17:07:59 +05:30
else:
domain = frappe.get_doc('Domain', 'Manufacturing')
domain.setup_data()
domain.setup_sidebar_items()