[19.0][OU-IMP] hr_expense: hr_expense_sheet compatibility - #5917
[19.0][OU-IMP] hr_expense: hr_expense_sheet compatibility#5917victoralmau wants to merge 1 commit into
Conversation
6b9f63c to
a3ee6f0
Compare
|
@victoralmau please, rebase. I made an error when force pushing to 19.0 (it's already amended) |
a3ee6f0 to
ed39bb7
Compare
ed39bb7 to
95012f4
Compare
Related to OCA/hr-expense#378 TT58631
95012f4 to
966a21e
Compare
hbrunn
left a comment
There was a problem hiding this comment.
why does any of this happen in hr_expense's migration, and not in the pre-init script of hr_expense_sheet?
|
|
||
| hr_expense / hr.expense / untaxed_amount (float) : NEW isfunction: function, stored | ||
|
|
||
| # DONE: hr_expense_sheet compatibility |
There was a problem hiding this comment.
what has this column to do with the above?
There was a problem hiding this comment.
I am referring to everything that comes after that: hr.expense.sheet
There was a problem hiding this comment.
so put it after what you're referring to
Why can't it be in OpenUpgrade? There are several reasons why I believe it SHOULD be here:
|
|
I think it just doesn't belong to this migration script because people won't necessary use hr_expense_sheet. And technically, it's not difficult to detect on installation of that module if you're coming from an ex-v18 version, so I don't see a reason to have unrelated code in the migration script of hr_expense |
|
@pedrobaeza and @MiquelRForgeFlow What do you think about this? |
pedrobaeza
left a comment
There was a problem hiding this comment.
It's a fact that both OpenUpgrade and OCA hr_expense_sheet initialization are depending each other, as if you migrate with enterprise, you won't find the expected columns (it removes them), but it's true that copying some columns, processing them or renaming them without knowing if you are going to install hr_expense_sheet is useless and time/space consuming (although we plan to install it in most installations), so let's move it to pre_init_hook as stated by Holger, and you can detect if former_sheet_id exists and then trigger in that case the rest of the code. In the module, you should also include a migration script without @openupgrade.migrate decorator importing and calling pre_init_hook.
|
Moved to OCA/hr-expense#378 |
hr_expense_sheetcompatibilityRelated to OCA/hr-expense#378
@Tecnativa TT58631