Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] openupgrade_framework : patched method migrate_module should change load_state for end-migration scripts to be run at install #4106

Open
metaminux opened this issue Aug 18, 2023 · 0 comments · May be fixed by #4107
Labels

Comments

@metaminux
Copy link

Module

openupgrade_framework

Describe the bug

In order to run migration scripts at install also, migrate_module method is patched to modify the module state field.
But in the original method, when dealing with end-migration scripts, state is initialized using load_state field

https://github.com/odoo/odoo/blob/9034602a028fb22fbd139cf41a2f5c71d9d8d032/odoo/modules/migration.py#L106-L110

So we need to modify the load_state field also for end-migration to run at install

To Reproduce

Affected versions: 16.0

Steps to reproduce the behavior:

  1. Create a end-migration script in module that is not yet installed but will be (with new dependency in another module)
  2. Launch the migration

Expected behavior
The end-migration script should be run

@metaminux metaminux added the bug label Aug 18, 2023
metaminux added a commit to meta-it/OpenUpgrade that referenced this issue Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant