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

Module: Forum

Entity: forum.post

Compute Method: _compute_website_url

View 18.0
Inputs Method Outputs
  • parent_id
  • id
  • forum_id
- self.website_url = False
- for post in self.filtered(lambda post: post.id):
-             anchor = f'#answer_{post.id}' if post.parent_id else ''
-             post.website_url = f'/forum/{self.env["ir.http"]._slug(post.forum_id)}/{self.env["ir.http"]._slug(post)}{anchor}'
  • website_url

Back to entity