fix: patch to update reason for leaving in employee
This commit is contained in:
parent
2160050c82
commit
e1781dc0bb
@ -732,3 +732,4 @@ erpnext.patches.v13_0.set_youtube_video_id
|
|||||||
erpnext.patches.v13_0.print_uom_after_quantity_patch
|
erpnext.patches.v13_0.print_uom_after_quantity_patch
|
||||||
erpnext.patches.v13_0.set_payment_channel_in_payment_gateway_account
|
erpnext.patches.v13_0.set_payment_channel_in_payment_gateway_account
|
||||||
erpnext.patches.v13_0.create_healthcare_custom_fields_in_stock_entry_detail
|
erpnext.patches.v13_0.create_healthcare_custom_fields_in_stock_entry_detail
|
||||||
|
erpnext.patches.v13_0.update_reason_for_resignation_in_employee
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# MIT License. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.reload_doc("hr", "doctype", "employee")
|
||||||
|
|
||||||
|
if frappe.db.has_column("Employee", "reason_for_resignation"):
|
||||||
|
frappe.db.sql(""" UPDATE `tabEmployee`
|
||||||
|
SET reason_for_leaving = reason_for_resignation
|
||||||
|
WHERE status = 'Left' and reason_for_leaving is null and reason_for_resignation is not null
|
||||||
|
""")
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user