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_migration_scan

View 18.0
Inputs Method Outputs
  • repository_id
  • repository_id.collect_migration_data
  • state
  • replaced_by_module_id
  • last_source_scanned_commit
  • module_branch_id
  • module_branch_id.last_scanned_commit
  • target_module_branch_id
  • target_module_branch_id.last_scanned_commit
  • last_target_scanned_commit
  • target_module_branch_id.pr_url
  • pr_url
- for rec in self:
-             rec.migration_scan = False
-             # No migration scan if repository is not configured to do it
-             if not rec.repository_id.collect_migration_data:
-                 continue
-             # No migration scan for modules moved to Odoo/OCA/generic repo
-             if rec.state and rec.state.startswith("moved_to"):
-                 continue
-             # No migration scan for modules replaced by another module
-             if rec.replaced_by_module_id:
-                 continue
-             if (
-                 rec.last_source_scanned_commit
-                 != rec.module_branch_id.last_scanned_commit
-             ):
-                 rec.migration_scan = True
-             elif (
-                 rec.target_module_branch_id.last_scanned_commit
-                 and rec.last_target_scanned_commit
-                 != rec.target_module_branch_id.last_scanned_commit
-             ):
-                 rec.migration_scan = True
-             elif rec.target_module_branch_id.pr_url != rec.pr_url:
-                 rec.migration_scan = True
  • migration_scan

Back to entity