Merge pull request #16314 from surajshetty3416/patch-to-rename-additional-salary-component

fix: patch to rename additional salary component
This commit is contained in:
Nabin Hait 2019-01-08 20:21:16 +05:30 committed by GitHub
commit 2da5937864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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")