Skip to content

Commit

Permalink
[16.0][FIX] openupgrade_framework : end-migration scripts are forced …
Browse files Browse the repository at this point in the history
…to run at install too

  Fixes OCA#4106
  • Loading branch information
metaminux committed Aug 18, 2023
1 parent f29f99f commit 9f09f7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openupgrade_framework/odoo_patch/odoo/modules/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ def migrate_module(self, pkg, stage):
to_install = pkg.state == "to install"
if to_install:
pkg.state = "to upgrade"
load_state_to_install = getattr(pkg, "load_state", False)
if load_state_to_install == "to install":
pkg.load_state = "to upgrade"
MigrationManager.migrate_module._original_method(self, pkg, stage)
if to_install:
pkg.state = "to install"
if load_state_to_install == "to install":
pkg.load_state = "to install"


migrate_module._original_method = MigrationManager.migrate_module
Expand Down

0 comments on commit 9f09f7b

Please sign in to comment.