Skip to content

mis_builder: migration 18.0.1.3.0 imports openupgradelib but it is not in external_dependencies #778

@dnplkndll

Description

@dnplkndll

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:

  1. Add openupgradelib to external_dependencies in __manifest__.py
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions