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_project_id

View 17.0 View 20.0
Inputs Method Outputs
  • display_in_project
  • parent_id
  • parent_id.project_id
  • project_id
  • is_template
+ self.env.remove_to_compute(self._fields['display_in_project'], self)
+ for task in self:
+             if not task.display_in_project and task.parent_id and task.parent_id.project_id != task.project_id:
+                 if not task.parent_id.project_id and not task.is_template:
+                     continue
+                 else:
+                     task.project_id = task.parent_id.project_id
  • project_id

Back to entity