From 196057ec6bad005821700eb8989e3c44396f8fed Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 22 Jul 2026 19:27:36 +0200 Subject: [PATCH] [OU-ADD] hr_holidays_attendance: Migration scripts TT61937 --- docsource/modules180-190.rst | 2 +- .../19.0.1.0/post-migration.py | 11 ++++++ .../19.0.1.0/upgrade_analysis_work.txt | 39 +++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/hr_holidays_attendance/19.0.1.0/post-migration.py create mode 100644 openupgrade_scripts/scripts/hr_holidays_attendance/19.0.1.0/upgrade_analysis_work.txt diff --git a/docsource/modules180-190.rst b/docsource/modules180-190.rst index 0c41d583aca0..6066a474b822 100644 --- a/docsource/modules180-190.rst +++ b/docsource/modules180-190.rst @@ -182,7 +182,7 @@ Module coverage 18.0 -> 19.0 +---------------------------------------------------+----------------------+-------------------------------------------------+ | hr_holidays |Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ -| hr_holidays_attendance | | | +| hr_holidays_attendance |Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ | |del| hr_holidays_contract | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/hr_holidays_attendance/19.0.1.0/post-migration.py b/openupgrade_scripts/scripts/hr_holidays_attendance/19.0.1.0/post-migration.py new file mode 100644 index 000000000000..d360a50a8c03 --- /dev/null +++ b/openupgrade_scripts/scripts/hr_holidays_attendance/19.0.1.0/post-migration.py @@ -0,0 +1,11 @@ +# Copyright 2026 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data( + env, "hr_holidays_attendance", "19.0.1.0/noupdate_changes.xml" + ) diff --git a/openupgrade_scripts/scripts/hr_holidays_attendance/19.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/hr_holidays_attendance/19.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..ea96f463029f --- /dev/null +++ b/openupgrade_scripts/scripts/hr_holidays_attendance/19.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,39 @@ +---Models in module 'hr_holidays_attendance'--- +new model hr.leave.attendance.report [sql_view] +---Fields in module 'hr_holidays_attendance'--- +hr_holidays_attendance / hr.attendance.overtime.line / compensable_as_leave (boolean): NEW +hr_holidays_attendance / hr.attendance.overtime.rule / compensable_as_leave (boolean): NEW hasdefault: default +# NOTHING TO DO: New feature to give overtime as time off, and being False the default, it keeps the previous behavior + +hr_holidays_attendance / hr.leave / employee_overtime (float) : not related anymore +hr_holidays_attendance / hr.leave / employee_overtime (float) : now a function +hr_holidays_attendance / hr.leave.allocation / employee_overtime (float) : not related anymore +hr_holidays_attendance / hr.leave.allocation / employee_overtime (float) : now a function +# NOTHING TO: Non stored field + +hr_holidays_attendance / hr.leave / overtime_id (many2one) : DEL relation: hr.attendance.overtime +hr_holidays_attendance / hr.leave.allocation / overtime_id (many2one) : DEL relation: hr.attendance.overtime +# NOTHING TO DO: No more hard-linking the relation between the overtime and the leave, but computed on the fly + +hr_holidays_attendance / hr.leave.accrual.level / frequency (False) : NEW selection_keys: ['bimonthly', 'biyearly', 'daily', 'hourly', 'monthly', 'weekly', 'worked_hours', 'yearly'], mode: modify +hr_holidays_attendance / hr.leave.accrual.level / frequency_hourly_source (selection): DEL selection_keys: ['attendance', 'calendar'] +# NOTHING TO DO: New accrual way of populating holidays from attendances, but not translatable from the old. + +---XML records in module 'hr_holidays_attendance'--- +DEL hr.leave.type: hr_holidays_attendance.holiday_status_extra_hours [renamed to hr_holidays module] (noupdate) +# NOTHING TO DO: Already renamed on hr_holidays + +NEW ir.actions.act_window: hr_holidays_attendance.hr_leave_attendance_report_action +DEL ir.actions.act_window: hr_holidays_attendance.hr_leave_allocation_overtime_action +NEW ir.model.access: hr_holidays_attendance.access_hr_leave_attendance_report_manager +NEW ir.ui.menu: hr_holidays_attendance.hr_leave_attendance_report +NEW ir.ui.view: hr_holidays_attendance.hr_attendance_employee_simple_tree_view +NEW ir.ui.view: hr_holidays_attendance.hr_attendance_overtime_rule_view_form +NEW ir.ui.view: hr_holidays_attendance.hr_leave_attendance_report_view_form +NEW ir.ui.view: hr_holidays_attendance.hr_leave_attendance_report_view_list +NEW ir.ui.view: hr_holidays_attendance.hr_leave_attendance_report_view_pivot +NEW ir.ui.view: hr_holidays_attendance.hr_leave_attendance_report_view_search +NEW ir.ui.view: hr_holidays_attendance.view_attendance_overtime_line_list +DEL ir.ui.view: hr_holidays_attendance.hr_leave_allocation_overtime_view_form +DEL ir.ui.view: hr_holidays_attendance.res_users_view_form +# NOTHING TO DO: noupdate=0 ir stuff