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

Module: Odoo MCA

Entity: odoo.module.branch.version

Compute Method: _compute_migration_script_url

View 18.0
Inputs Method Outputs
  • module_branch_id
  • module_branch_id.repository_id
  • has_migration_script
  • module_branch_id.addons_path
  • module_branch_id.module_name
  • manifest_value
  • module_branch_id.repository_branch_id
+ for rec in self:
+             rec.migration_script_url = False
+             repo = rec.module_branch_id.repository_id
+             if rec.has_migration_script:
+                 migration_path = "/".join(
+                     [
+                         rec.module_branch_id.addons_path or ".",
+                         rec.module_branch_id.module_name,
+                         "migrations",
+                         rec.manifest_value,
+                     ]
+                 )
+                 rb = rec.module_branch_id.repository_branch_id
+                 branch_name = rb.cloned_branch or rb.branch_id.name
+                 rec.migration_script_url = repo._get_resource_url(
+                     branch_name, migration_path
+                 )
  • migration_script_url

Back to entity