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_partner_id

View 17.0 View 20.0
Inputs Method Outputs
  • partner_id
  • project_id
  • parent_id
  • has_template_ancestor
""" Compute the partner_id when the tasks have no partner_id.

            Use the project partner_id if any, or else the parent task partner_id.
        """
for task in self:
+             if task.has_template_ancestor:
+                 continue
            if task.partner_id and not (task.project_id or task.parent_id):
                task.partner_id = False
                continue
            if not task.partner_id:
                task.partner_id = self._get_default_partner_id(task.project_id, task.parent_id)
  • partner_id

Back to entity