Merge pull request #6038 from nabinhait/portal_settings_schools
Portal settings for schools
This commit is contained in:
commit
88fff46ab4
@ -101,7 +101,7 @@ portal_menu_items = [
|
||||
{"title": _("Addresses"), "route": "/addresses", "reference_doctype": "Address"},
|
||||
{"title": _("Announcements"), "route": "/announcement", "reference_doctype": "Announcement"},
|
||||
{"title": _("Courses"), "route": "/course", "reference_doctype": "Course"},
|
||||
{"title": _("Assessment Schedule"), "route": "/Assessment", "reference_doctype": "Assessment"},
|
||||
{"title": _("Assessment Schedule"), "route": "/assessment", "reference_doctype": "Assessment"},
|
||||
{"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees"}
|
||||
]
|
||||
|
||||
|
@ -308,5 +308,6 @@ erpnext.patches.v7_0.make_guardian
|
||||
erpnext.patches.v7_0.update_refdoc_in_landed_cost_voucher
|
||||
erpnext.patches.v7_0.set_material_request_type_in_item
|
||||
erpnext.patches.v7_0.rename_examination_to_assessment
|
||||
erpnext.patches.v7_0.set_portal_settings
|
||||
erpnext.patches.v7_0.repost_future_gle_for_purchase_invoice
|
||||
erpnext.patches.v7_0.fix_duplicate_icons
|
@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from erpnext.setup.setup_wizard import domainify
|
||||
|
||||
def execute():
|
||||
reload_doctypes_for_schools_icons()
|
||||
@ -10,7 +9,6 @@ def execute():
|
||||
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`""")
|
||||
if not frappe.db.exists('Module Def', 'Schools'):
|
||||
frappe.get_doc({
|
||||
@ -21,12 +19,9 @@ def execute():
|
||||
frappe.db.sql("""update `tabDocType` set module='Schools' where module='Academics'""")
|
||||
from frappe.installer import remove_from_installed_apps
|
||||
remove_from_installed_apps("schools")
|
||||
domainify.setup_domain('Education')
|
||||
else:
|
||||
frappe.get_doc('Portal Settings', 'Portal Settings').sync_menu()
|
||||
domainify.setup_sidebar_items(domainify.get_domain('Manufacturing'))
|
||||
|
||||
def reload_doctypes_for_schools_icons():
|
||||
for name in ('student', 'student_group', 'course_schedule', 'student_attendance', 'room', 'program_enrollment',
|
||||
'course', 'program', 'student_applicant', 'examination', 'fees', 'instructor', 'announcement'):
|
||||
frappe.reload_doc('schools', 'doctype', name)
|
||||
for name in ('student', 'student_group', 'course_schedule', 'student_attendance', 'room',
|
||||
'program_enrollment', 'course', 'program', 'student_applicant', 'fees',
|
||||
'instructor', 'announcement'):
|
||||
frappe.reload_doc('schools', 'doctype', name)
|
||||
|
@ -12,4 +12,5 @@ def execute():
|
||||
frappe.reload_doctype("Assessment")
|
||||
rename_field("Assessment", "exam_name", "assessment_name")
|
||||
rename_field("Assessment", "exam_code", "assessment_code")
|
||||
|
||||
|
||||
frappe.db.sql("delete from `tabPortal Menu Item` where route = '/examination'")
|
18
erpnext/patches/v7_0/set_portal_settings.py
Normal file
18
erpnext/patches/v7_0/set_portal_settings.py
Normal file
@ -0,0 +1,18 @@
|
||||
# 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
|
||||
from erpnext.setup.setup_wizard import domainify
|
||||
|
||||
def execute():
|
||||
for dt in ("assessment", "announcement", "course", "fees"):
|
||||
frappe.reload_doc("schools", "doctype", dt)
|
||||
|
||||
frappe.get_doc('Portal Settings').sync_menu()
|
||||
|
||||
if 'schools' in frappe.get_installed_apps():
|
||||
domainify.setup_domain('Education')
|
||||
else:
|
||||
domainify.setup_sidebar_items(domainify.get_domain('Manufacturing'))
|
Loading…
x
Reference in New Issue
Block a user