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

Module: Stock Transport

Entity: stock.picking.batch

Compute Method: _compute_dock_id

Inputs Method Outputs
for batch in self:
            if batch.picking_type_id != batch._origin.picking_type_id and batch.dock_id:
                batch.dock_id = False
            if batch.picking_ids and len(batch.picking_ids.location_id) == 1 and batch.picking_ids.location_id in batch.allowed_dock_ids:
                batch.dock_id = batch.picking_ids.location_id

Back to entity