Skip to content

Commit 347832d

Browse files
committed
[OU-ADD] exclude analytic 1.2 migration
1 parent fd96540 commit 347832d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

openupgrade_framework/odoo_patch/odoo/modules/migration.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,16 @@ def migrate_module(self, pkg, stage):
2020
pkg.state = "to install"
2121

2222

23+
def _get_files(self):
24+
"""Turns out Odoo SA sometimes add migration scripts that interfere with
25+
OpenUpgrade. Those we filter out here"""
26+
MigrationManager._get_files._original_method(self)
27+
to_exclude = [("analytic", "1.2")]
28+
for addon, version in to_exclude:
29+
self.migrations.get(addon, {}).get("module", {}).pop(version, None)
30+
31+
2332
migrate_module._original_method = MigrationManager.migrate_module
2433
MigrationManager.migrate_module = migrate_module
34+
_get_files._original_method = MigrationManager._get_files
35+
MigrationManager._get_files = _get_files

0 commit comments

Comments
 (0)