[Patch] Attendance Date rename field
This commit is contained in:
parent
d5442b5544
commit
42f55cf4b1
@ -374,3 +374,4 @@ erpnext.patches.v7_2.update_party_type
|
|||||||
erpnext.patches.v7_2.setup_auto_close_settings
|
erpnext.patches.v7_2.setup_auto_close_settings
|
||||||
erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted
|
erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted
|
||||||
erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component
|
erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component
|
||||||
|
erpnext.patches.v7_2.rename_att_date_attendance
|
||||||
|
14
erpnext/patches/v7_2/rename_att_date_attendance.py
Normal file
14
erpnext/patches/v7_2/rename_att_date_attendance.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import frappe
|
||||||
|
from frappe.model.utils.rename_field import update_reports, update_users_report_view_settings, update_property_setters
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
if "att_date" not in frappe.db.get_table_columns("Attendance"):
|
||||||
|
return
|
||||||
|
frappe.reload_doc("HR", "doctype", "attendance")
|
||||||
|
frappe.db.sql("""update `tabAttendance`
|
||||||
|
set attendance_date = att_date
|
||||||
|
where (att_date is not null or att_date != '') and (attendance_date is null or attendance_date = '')""")
|
||||||
|
|
||||||
|
update_reports("Attendance", "att_date", "attendance_date")
|
||||||
|
update_users_report_view_settings("Attendance", "att_date", "attendance_date")
|
||||||
|
update_property_setters("Attendance", "att_date", "attendance_date")
|
Loading…
x
Reference in New Issue
Block a user