From c349ae26b99dc8e97efc5e8cc8766f34dff25992 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 2 Jan 2019 09:31:11 +0530 Subject: [PATCH] Add patch to rename additional salary component - Should fix https://pastebin.com/xsNHPAh6 (happens when clicking links option in menu of Employee master) --- erpnext/patches.txt | 1 + ...me_additional_salary_component_additional_salary.py | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 9b8a69d2b2..be8201a07d 100755 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -580,3 +580,4 @@ erpnext.patches.v11_0.update_delivery_trip_status erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items erpnext.patches.v11_0.set_missing_gst_hsn_code erpnext.patches.v11_0.rename_bom_wo_fields +erpnext.patches.v11_0.rename_additional_salary_component_additional_salary \ No newline at end of file diff --git a/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py b/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py new file mode 100644 index 0000000000..8fa876dd74 --- /dev/null +++ b/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py @@ -0,0 +1,10 @@ +import frappe + +# this patch should have been included with this PR https://github.com/frappe/erpnext/pull/14302 + +def execute(): + if frappe.db.table_exists("Additional Salary Component"): + if not frappe.db.table_exists("Additional Salary"): + frappe.rename_doc("DocType", "Additional Salary Component", "Additional Salary") + + frappe.delete_doc('DocType', "Additional Salary Component")