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

Inputs Method Outputs
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
                )

Back to entity