From 7fc05d643268a368ba32d2948a1b03705aa756fb Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 17 Nov 2016 12:16:52 +0530 Subject: [PATCH] Update update_missing_salary_component_type.py --- erpnext/patches/v7_1/update_missing_salary_component_type.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v7_1/update_missing_salary_component_type.py b/erpnext/patches/v7_1/update_missing_salary_component_type.py index f0e3f6a4ad..25624f56ea 100644 --- a/erpnext/patches/v7_1/update_missing_salary_component_type.py +++ b/erpnext/patches/v7_1/update_missing_salary_component_type.py @@ -9,6 +9,8 @@ earnings or deductions in existing salary slips ''' def execute(): + frappe.reload_doc("accounts", "doctype", "salary_component_account") + for s in frappe.db.sql('''select name, type, salary_component_abbr from `tabSalary Component` where ifnull(type, "")="" or ifnull(salary_component_abbr, "") = ""''', as_dict=1): @@ -43,4 +45,4 @@ def execute(): component.salary_component_abbr = abbr - component.save() \ No newline at end of file + component.save()