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

Module: Sales - Project

Entity: project.project

Compute Method: _compute_partner_id

View 17.0 View 19.0
Inputs Method Outputs
  • allow_billable
  • company_id
  • partner_id
  • partner_id.company_id
for project in self:
            # Ensures that the partner_id and its project do not have different companies set
            if not project.allow_billable or (project.company_id and project.partner_id.company_id and project.company_id != project.partner_id.company_id):
                project.partner_id = False
  • partner_id

Back to entity