fix: reload docs before creating custom fields (#17585)

This commit is contained in:
Saurabh
2019-05-15 07:43:16 +05:30
committed by Nabin Hait
parent 391b3b67cb
commit 1c2915f74b
3 changed files with 15 additions and 1 deletions

View File

@@ -7,8 +7,11 @@ def execute():
if not company:
return
frappe.reload_doc('hr', 'doctype', 'payroll_period')
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_tax_exemption_declaration_category')
frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_proof_submission_detail')
for doctype in ["Sales Invoice", "Delivery Note", "Purchase Invoice"]:
frappe.db.sql("""delete from `tabCustom Field` where dt = %s