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

Module: Transport

Entity: tms.order

Compute Method: _compute_crew_ids_domain

Inputs Method Outputs
crews = self.env["tms.crew"]
all_crews_ids = crews.browse(crews._search([])).ids
for order in self:
            if order.tms_team_id:
                order.crew_ids_domain = [(6, 0, order.tms_team_id.crew_ids.ids)]
            else:
                order.crew_ids_domain = [(6, 0, all_crews_ids)]

Back to entity