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

Module: Inventory

Entity: stock.picking

Compute Method: _has_scrap_move

Inputs Method Outputs
result = {
            picking
            for [picking] in self.env['stock.move']._read_group(
                [('picking_id', 'in', self.ids), ('is_scrap', '=', True)],
                ['picking_id'],
            )
        }
for picking in self:
            picking.has_scrap_move = picking._origin in result

Back to entity