From e9674f88660e14ce48239771b76310044fc37090 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 1 Aug 2016 12:13:11 +0530 Subject: [PATCH] Create columns for custom fields in new table Salary Detail and Component --- .../patches/v7_0/remove_old_earning_deduction_doctypes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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