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 Approval

Entity: document.page.history

Compute Method: _compute_page_url

View 17.0 View 19.0
Inputs Method Outputs
  • id
"""Compute the page url."""
for page in self:
            base_url = (
                self.env["ir.config_parameter"]
                .sudo()
                .get_param("web.base.url", default="http://localhost:8069")
            )

            page.page_url = (
-                 "{}/web#db={}&id={}&" "model=document.page.history"
-             ).format(base_url, self.env.cr.dbname, page.id)
+                 f"{base_url}/web#db={self.env.cr.dbname}&id={page.id}&"
+                 "model=document.page.history"
+             )
  • page_url

Back to entity