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

Module: Project

Entity: project.task

Compute Method: _compute_display_follow_button

Inputs Method Outputs
if not self.env.user.share:
            self.display_follow_button = False
            return
project_collaborator_read_group = self.env['project.collaborator']._read_group(
            [('project_id', 'in', self.project_id.ids), ('partner_id', '=', self.env.user.partner_id.id)],
            ['project_id'],
            ['limited_access:bool_and'],
        )
limited_access_per_project_id = dict(project_collaborator_read_group)
for task in self:
            task.display_follow_button = not limited_access_per_project_id.get(task.project_id, True)

Back to entity