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

Module: Stock Picking Volume

Entity: stock.picking

Compute Method: _compute_volume

Inputs Method Outputs
for picking in self:
            moves = picking.move_ids
            exclude_cancel = any(m.state != "cancel" for m in moves)
            volume = 0
            for move in moves:
                if move.state == "cancel" and exclude_cancel:
                    continue
                volume += move.volume
            if picking.volume != volume:
                picking.volume = volume

Back to entity