Create columns for custom fields in new table Salary Detail and Component

This commit is contained in:
Nabin Hait
2016-08-01 12:13:11 +05:30
parent 84306ccc4c
commit e9674f8866

View File

@@ -9,4 +9,8 @@ def execute():
for dt in ("Salary Structure Earning", "Salary Structure Deduction", "Salary Slip Earning", for dt in ("Salary Structure Earning", "Salary Structure Deduction", "Salary Slip Earning",
"Salary Slip Deduction", "Earning Type", "Deduction Type"): "Salary Slip Deduction", "Earning Type", "Deduction Type"):
frappe.delete_doc("DocType", dt) frappe.delete_doc("DocType", dt)
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()