fix: reload docs before creating custom fields (#17586)
This commit is contained in:
parent
4c0f754a96
commit
9da57d79b5
@ -70,7 +70,7 @@ def update_instructors(comp_dict):
|
||||
emp_details = frappe.get_all("Employee", fields=["name", "company"])
|
||||
|
||||
for employee in emp_details:
|
||||
records = comp_dict[employee.company]
|
||||
records = comp_dict[employee.company] if employee.company else []
|
||||
|
||||
for department in records:
|
||||
when_then.append('''
|
||||
|
@ -8,6 +8,17 @@ def execute():
|
||||
return
|
||||
frappe.reload_doc("hr", "doctype", "Employee Tax Exemption Declaration")
|
||||
frappe.reload_doc("hr", "doctype", "Employee Tax Exemption Proof Submission")
|
||||
frappe.reload_doc("hr", "doctype", "Employee Grade")
|
||||
frappe.reload_doc("hr", "doctype", "Leave Policy")
|
||||
|
||||
frappe.reload_doc("accounts", "doctype", "Bank Account")
|
||||
frappe.reload_doc("accounts", "doctype", "Tax Withholding Category")
|
||||
frappe.reload_doc("accounts", "doctype", "Allowed To Transact With")
|
||||
frappe.reload_doc("accounts", "doctype", "Finance Book")
|
||||
frappe.reload_doc("accounts", "doctype", "Loyalty Program")
|
||||
|
||||
frappe.reload_doc("stock", "doctype", "Item Barcode")
|
||||
|
||||
make_custom_fields()
|
||||
|
||||
frappe.reload_doc("accounts", "doctype", "sales_taxes_and_charges")
|
||||
|
@ -7,6 +7,9 @@ def execute():
|
||||
if not company:
|
||||
return
|
||||
|
||||
frappe.reload_doc('hr', 'doctype', 'payroll_period')
|
||||
frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_declaration_category')
|
||||
frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_proof_submission_detail')
|
||||
frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_declaration')
|
||||
frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_proof_submission')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user