[fix] reload Leave Period and Staffing Plan doctypes
diff --git a/erpnext/patches/v11_0/create_department_records_for_each_company.py b/erpnext/patches/v11_0/create_department_records_for_each_company.py
index 9407185..4cfe960 100644
--- a/erpnext/patches/v11_0/create_department_records_for_each_company.py
+++ b/erpnext/patches/v11_0/create_department_records_for_each_company.py
@@ -2,7 +2,9 @@
from frappe.utils.nestedset import rebuild_tree
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"])
departments = frappe.db.get_all("Department")
comp_dict = {}