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

Module: Field Service - CRM

Entity: fsm.order

Compute Method: _compute_sales_person_id

Inputs Method Outputs
has_dispacher_group = self._has_dispacher_group()
for order in self:
            if order.opportunity_id and order.opportunity_id.user_id:
                order.sales_person_id = order.opportunity_id.user_id
            elif not order.sales_person_id:
                if has_dispacher_group:
                    order.sales_person_id = self.env.user
                else:
                    order.sales_person_id = False

Back to entity