[MIG][15.0] hr_holidays: migration script#3336
[MIG][15.0] hr_holidays: migration script#3336pedrobaeza merged 2 commits intoOCA:15.0from tranngocson1996:v15_mig_hr_holidays_1
Conversation
|
/ocabot migration hr_holidays |
remi-filament
left a comment
There was a problem hiding this comment.
Tested OK on our dabatase migration.
Thank you @tranngocson1996
remi-filament
left a comment
There was a problem hiding this comment.
Double-checking holiday type configuration, I think there is a misunderstading on mapping allocation_type and allocation_validation_type (from v14) with requires_allocation, employee_requests and allocation_validation_type (from v15)
openupgrade_scripts/scripts/hr_holidays/15.0.1.5/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/hr_holidays/15.0.1.5/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/hr_holidays/15.0.1.5/pre-migration.py
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/hr_holidays/15.0.1.5/pre-migration.py
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/hr_holidays/15.0.1.5/pre-migration.py
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/hr_holidays/15.0.1.5/pre-migration.py
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/hr_holidays/15.0.1.5/upgrade_analysis_work.txt
Show resolved
Hide resolved
openupgrade_scripts/scripts/hr_holidays/15.0.1.5/pre-migration.py
Outdated
Show resolved
Hide resolved
| hr_holidays / hr.leave.allocation / interval_unit (selection) : DEL selection_keys: ['days', 'months', 'weeks', 'years'] | ||
| hr_holidays / hr.leave.allocation / lastcall (date) : NEW hasdefault | ||
| hr_holidays / hr.leave.allocation / number_per_interval (float) : DEL | ||
| # NOTHING TO DO: handled by ORM |
There was a problem hiding this comment.
This should be converted to an accrual plan instead, and link the allocation with it.
openupgrade_scripts/scripts/hr_holidays/15.0.1.5/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
| # DONE: map validate1 -> confirm | ||
|
|
||
| hr_holidays / hr.leave.allocation / taken_leave_ids (one2many) : NEW relation: hr.leave | ||
| hr_holidays / hr.leave.allocation / unit_per_interval (selection) : DEL selection_keys: ['days', 'hours'] |
There was a problem hiding this comment.
This one goes also to the accrual plan.
|
@tranngocson1996 Can you attend the comments? Thanks |
|
@pedrobaeza I am not able to recreate plans/levels, because not enough data. I see some vague map between hr.leave.allocation.unit_per_interval -> hr.leave.accrual.level.added_value_type and hr.leave.allocation.interval_unit -> hr.leave.accrual.level.frequency, but not enough old info to create those plans/levels with all those new fields. |
pedrobaeza
left a comment
There was a problem hiding this comment.
Accrual plans are not created from previous existing allocations, as there's no 100% mapping between them, so that TODO is there, but being a very special case, let's continue with the merge.
Migration done