Problem
The migration file mis_builder/migrations/18.0.1.3.0/post-migration.py imports openupgradelib:
from openupgradelib import openupgrade
However, openupgradelib is not declared in the module's __manifest__.py under external_dependencies. This causes the migration to fail with ModuleNotFoundError on environments that don't have openupgradelib pre-installed.
Same issue as OCA/server-ux#1261 (for date_range).
Error
ModuleNotFoundError: No module named 'openupgradelib'
ImportError: module mis_builder: Unable to load post-migration file
.../mis_builder/migrations/18.0.1.3.0/post-migration.py
Expected
Either:
- Add
openupgradelib to external_dependencies in __manifest__.py
- Or rewrite the migration without
openupgradelib — the script only uses @openupgrade.migrate() as a decorator, which could be replaced with a standard Odoo migration function signature.
Option 2 is preferable since the only openupgradelib usage here is the @openupgrade.migrate() decorator.
Environment
- Odoo 18.0 CE
- Doodba-based Docker deployment
Problem
The migration file
mis_builder/migrations/18.0.1.3.0/post-migration.pyimportsopenupgradelib:However,
openupgradelibis not declared in the module's__manifest__.pyunderexternal_dependencies. This causes the migration to fail withModuleNotFoundErroron environments that don't haveopenupgradelibpre-installed.Same issue as OCA/server-ux#1261 (for
date_range).Error
Expected
Either:
openupgradelibtoexternal_dependenciesin__manifest__.pyopenupgradelib— the script only uses@openupgrade.migrate()as a decorator, which could be replaced with a standard Odoo migration function signature.Option 2 is preferable since the only
openupgradelibusage here is the@openupgrade.migrate()decorator.Environment