Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Odoo Project Migration Data

Entity: odoo.project.module.migration

Compute Method: _compute_state

View 18.0
Inputs Method Outputs
  • module_migration_id
  • module_migration_id.state
  • replaced_by_module_id
  • source_module_branch_id
  • source_module_branch_id.is_standard
  • target_module_branch_id
  • target_module_branch_id.repository_branch_id
- for rec in self:
-             rec.state = rec.module_migration_id.state
-             if rec.replaced_by_module_id:
-                 # Module replaced by another one
-                 rec.state = "replaced"
-                 continue
-             if not rec.module_migration_id:
-                 # Default state (used by project specific modules)
-                 rec.state = "migrate"
-                 if rec.source_module_branch_id.is_standard:
-                     # Odoo S.A. modules
-                     rec.state = (
-                         "available" if rec.target_module_branch_id else "removed"
-                     )
-                 elif rec.target_module_branch_id.repository_branch_id:
-                     # repo with collect_migration_data = False
-                     rec.state = "available"
  • state

Back to entity