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

Module: Odoo Repository Migration Data

Entity: odoo.module.branch.migration

Compute Method: _compute_state

View 18.0
Inputs Method Outputs
  • replaced_by_module_id
  • moved_to_standard
  • moved_to_oca
  • moved_to_generic
  • process
  • target_module_branch_id
  • target_module_branch_id.pr_url
  • pr_url
+ for rec in self:
+             if rec.replaced_by_module_id:
+                 # Module replaced by another one
+                 rec.state = "replaced"
+                 continue
+             if rec.moved_to_standard:
+                 # Module moved to a standard repository (likely from OCA to
+                 # odoo/odoo, like 'l10n_eu_oss', 'knowledge', ...).
+                 # E.g. this could tell integrators that a module like
+                 # 'l10n_eu_oss_oca' should now be used instead.
+                 rec.state = "moved_to_standard"
+                 continue
+             if rec.moved_to_oca:
+                 # Module moved to an OCA repository
+                 rec.state = "moved_to_oca"
+                 continue
+             if rec.moved_to_generic:
+                 # Specific module moved to a generic repository (public or private)
+                 rec.state = "moved_to_generic"
+                 continue
+             rec.state = rec.process or (
+                 "fully_ported"
+                 if (
+                     rec.target_module_branch_id
+                     and not rec.target_module_branch_id.pr_url
+                 )
+                 else "migrate"
+             )
+             if rec.process == "migrate" and rec.pr_url:
+                 rec.state = "review_migration"
  • state

Back to entity