diff --git a/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/pre-migration.py b/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/pre-migration.py index a9c47fb693e0..0833472ab6b6 100644 --- a/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/pre-migration.py +++ b/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/pre-migration.py @@ -20,6 +20,18 @@ ], } +_field_add = [ + ( + "number_of_hours", + "hr.leave", + "hr_leave", + "float", + None, + "hr_holidays", + 0.0, + ), +] + def _pre_create_accrual_plan_active(cr): """ @@ -156,6 +168,7 @@ def migrate(env, version): openupgrade.rename_models(env.cr, _model_renames) openupgrade.rename_tables(env.cr, _table_renames) openupgrade.rename_columns(env.cr, _column_renames) + openupgrade.add_fields(env, _field_add) _pre_create_accrual_plan_active(env.cr) _hr_leave_company_id(env.cr) _map_leave_accrual_level_action(env.cr) diff --git a/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/upgrade_analysis_work.txt index 0faccd0c5fdf..700f71baf9c5 100644 --- a/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/upgrade_analysis_work.txt +++ b/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/upgrade_analysis_work.txt @@ -29,8 +29,10 @@ hr_holidays / hr.leave / mode_company_id (many2one) : not a # NOTHING TO DO: states removed only hr_holidays / hr.leave / number_of_days (float) : now a function +# NOTHING TO DO + hr_holidays / hr.leave / number_of_hours (float) : NEW isfunction: function, stored -# NOTHING TO DO: computed fields +# DONE: pre-migration: add column for avoiding the computation hr_holidays / hr.leave / rating_ids (one2many) : NEW relation: rating.rating hr_holidays / hr.leave / resource_calendar_id (many2one): NEW relation: resource.calendar, hasdefault: compute