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

Module: Document Page

Entity: document.page

Compute Method: _compute_backend_url

Inputs Method Outputs
  • id
tmpl = "/web#id={}&model=document.page&view_type=form"
for rec in self:
            url = tmpl.format(rec.id)
            # retrieve action
            action = None
            parent = rec
            while not action and parent:
                action = parent.menu_id.action
                parent = parent.parent_id
            if action:
                url += f"&action={action.id}"
            rec.backend_url = url

Back to entity