diff --git a/erpnext/patches/v7_0/remove_old_earning_deduction_doctypes.py b/erpnext/patches/v7_0/remove_old_earning_deduction_doctypes.py index 03595a58f8..05a2c49461 100644 --- a/erpnext/patches/v7_0/remove_old_earning_deduction_doctypes.py +++ b/erpnext/patches/v7_0/remove_old_earning_deduction_doctypes.py @@ -9,4 +9,8 @@ def execute(): for dt in ("Salary Structure Earning", "Salary Structure Deduction", "Salary Slip Earning", "Salary Slip Deduction", "Earning Type", "Deduction Type"): frappe.delete_doc("DocType", dt) - \ No newline at end of file + + + for d in frappe.db.sql("""select name from `tabCustom Field` + where dt in ('Salary Detail', 'Salary Component')"""): + frappe.get_doc("Custom Field", d[0]).save() \ No newline at end of file