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

Module: Project Task Code Portal

Entity: project.task

Compute Method: _compute_portal_url

Inputs Method Outputs
  • project_id
  • project_id.privacy_visibility
  • project_id.id
  • code
for rec in self:
            rec.portal_url = ""
            rec.portal_url_visible = False
            if rec.project_id.privacy_visibility == "portal":
                rec.portal_url_visible = True
                base_url = rec.get_base_url()
                rec.portal_url = (
                    f"{base_url}/my/projects/{rec.project_id.id}/task/{rec.code}"
                )

Back to entity