File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
openupgrade_scripts/scripts/hr_holidays/17.0.1.6 Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 2020 ],
2121}
2222
23+ _field_add = [
24+ (
25+ "number_of_hours" ,
26+ "hr.leave" ,
27+ "hr_leave" ,
28+ "float" ,
29+ None ,
30+ "hr_holidays" ,
31+ 0.0 ,
32+ ),
33+ ]
34+
2335
2436def _pre_create_accrual_plan_active (cr ):
2537 """
@@ -156,6 +168,7 @@ def migrate(env, version):
156168 openupgrade .rename_models (env .cr , _model_renames )
157169 openupgrade .rename_tables (env .cr , _table_renames )
158170 openupgrade .rename_columns (env .cr , _column_renames )
171+ openupgrade .add_fields (env , _field_add )
159172 _pre_create_accrual_plan_active (env .cr )
160173 _hr_leave_company_id (env .cr )
161174 _map_leave_accrual_level_action (env .cr )
Original file line number Diff line number Diff line change @@ -29,8 +29,10 @@ hr_holidays / hr.leave / mode_company_id (many2one) : not a
2929# NOTHING TO DO: states removed only
3030
3131hr_holidays / hr.leave / number_of_days (float) : now a function
32+ # NOTHING TO DO
33+
3234hr_holidays / hr.leave / number_of_hours (float) : NEW isfunction: function, stored
33- # NOTHING TO DO: computed fields
35+ # DONE: pre-migration: add column for avoiding the computation
3436
3537hr_holidays / hr.leave / rating_ids (one2many) : NEW relation: rating.rating
3638hr_holidays / hr.leave / resource_calendar_id (many2one): NEW relation: resource.calendar, hasdefault: compute
You can’t perform that action at this time.
0 commit comments