Merge pull request #14035 from saurabh6790/v11_patch_fix

[fix] reload Leave Period and Staffing Plan doctypes
This commit is contained in:
Saurabh 2018-05-15 10:49:53 +05:30 committed by GitHub
commit 12f708d155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,9 @@ import frappe
from frappe.utils.nestedset import rebuild_tree from frappe.utils.nestedset import rebuild_tree
def execute(): def execute():
frappe.reload_doc("hr", "doctype", "department") for doctype in ['department', 'leave_period', 'staffing_plan']:
frappe.reload_doc("hr", "doctype", doctype)
companies = frappe.db.get_all("Company", fields=["name", "abbr"]) companies = frappe.db.get_all("Company", fields=["name", "abbr"])
departments = frappe.db.get_all("Department") departments = frappe.db.get_all("Department")
comp_dict = {} comp_dict = {}