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

Module: HR commissions

Entity: res.partner

Compute Method: _compute_employee

View 17.0
Inputs Method Outputs
  • employee_id
  • agent_type
- """Set the Boolean field according to the ResPartner-HrEmployee
-         relation created here
-         """
- if hasattr(super(), "_compute_employee"):
-             return super()._compute_employee()
- for record in self:
-             if record.employee_id and record.agent_type == "salesman":
-                 record.employee = True
-             else:
-                 record.employee = False
  • employee

Back to entity