[19.0][IMP] base: Load additional renames/merges from env.#5765
Conversation
hbrunn
left a comment
There was a problem hiding this comment.
I would prefer to see this in openupgradelib, otherwise we have to reimplement this for every version
|
@hbrunn that's not possible, as you may call |
|
so add a parameter enabling this which defaults to False |
And we will need to modify the same each OpenUpgrade version to add here such parameter... |
|
true, but we don't need to copy&paste a bunch of logic |
|
another option would be to have a function in openupgrade_scripts itself that does the initial renaming and merging, which the base migration just calls, and your code happens there. that then also goes automatically to all new versions |
|
OK, let's do it that way. @david-banon-tecnativa do you have clear what to do? The keyword argument can be |
You wrote meanwhile I was writing the other. The problem with this suggestion is that there's no apriori.py file in openupgralib to import, so I don't think we can move such code. |
d972cde to
0ba602e
Compare
| # Copyright 2025 Hunki Enterprises BV | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
|
||
|
|
0ba602e to
7eec2f6
Compare
|
/ocabot merge nobump |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
@hbrunn The merge process could not start, because command |
|
This PR has the |
1 similar comment
|
This PR has the |
|
Congratulations, your PR was merged at 6437799. Thanks a lot for contributing to OCA. ❤️ |
Backport of OCA#5765 TT63118 @Tecnativa
Backport of #5765 TT63118 @Tecnativa
Backport of #5765 TT63118 @Tecnativa
Backport of #5765 TT63118 @Tecnativa
Backport of #5765 TT63118 @Tecnativa
Backport of #5765 TT63118 @Tecnativa
Backport of #5765 TT63118 @Tecnativa
|
@david-banon-tecnativa please document the env vars somewhere in https://github.com/OCA/OpenUpgrade/tree/documentation |
|
https://github.com/OCA/OpenUpgrade/blob/documentation/docsource/040_run_migration.rst#configuration-options probably is the right place |
|
Ok, OMW |
With this change, merging and renaming private modules no longer needs to be done in a custom module, and now can happen at the same time as OCA modules.
To use this feature:
When running openupgrade, set the OPENUPGRADE_MERGED_MODULES and OPENUPGRADE_RENAMED_MODULES environment variables to raw JSON data containing the private renames/merges in the same format as in apriori.py .
Example OPENUPGRADE_MERGED_MODULES to merge "custom module" into "helpdesk_mgmt".
{"custom_module":"helpdesk_mgmt"}No changes should be made on current workflows if this feature is not used.
Once this PR gets approved i'll backport to all versions of OU
@pedrobaeza @victoralmau
@Tecnativa TT63118