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: - # TDE FIXME: better implementation - picking.has_scrap_move = bool(self.env['stock.move'].search_count([('picking_id', '=', picking.id), ('scrapped', '=', True)])) + picking.has_scrap_move = picking._origin in result |
|
