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_driver_ids_domain

Inputs Method Outputs
drivers = self.env["tms.driver"]
all_driver_ids = drivers.browse(drivers._search([])).ids
for order in self:
            order.driver_ids_domain = [(6, 0, all_driver_ids)]
            if order.tms_team_id:
                order.driver_ids_domain = [(6, 0, order.tms_team_id.driver_ids.ids)]
            if order.crew_id:
                order.driver_ids_domain = [(6, 0, order.crew_id.driver_ids.ids)]

Back to entity