[fix] patch for schools;
This commit is contained in:
parent
a7d92bc8f6
commit
36f2d4f81e
@ -1,5 +1,5 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe, os
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
reload_doctypes_for_schools_icons()
|
reload_doctypes_for_schools_icons()
|
||||||
@ -21,5 +21,7 @@ def execute():
|
|||||||
remove_from_installed_apps("schools")
|
remove_from_installed_apps("schools")
|
||||||
|
|
||||||
def reload_doctypes_for_schools_icons():
|
def reload_doctypes_for_schools_icons():
|
||||||
for d in frappe.get_all('DocType', filters={'module': 'Schools'}):
|
base_path = frappe.get_app_path('erpnext', 'schools', 'doctype')
|
||||||
frappe.reload_doc('schools', 'doctype', frappe.scrub(d.name))
|
for doctype in os.listdir(base_path):
|
||||||
|
if os.path.exists(os.path.join(base_path, doctype, doctype + '.json')):
|
||||||
|
frappe.reload_doc('schools', 'doctype', doctype)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user