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

Module: Repairs

Entity: repair.order

Compute Method: _compute_allowed_lot_ids

View 19.0
Inputs Method Outputs
  • product_id
  • product_id.id
  • picking_id
  • picking_id.move_ids
  • picking_id.move_ids.lot_ids
  • picking_id.move_ids.lot_ids.ids
+ for repair in self:
+             domain = Domain('product_id', '=', repair.product_id.id)
+             if repair.picking_id:
+                 domain &= Domain('id', 'in', repair.picking_id.move_ids.lot_ids.ids)
+             repair.allowed_lot_ids = self.env['stock.lot'].search(domain)
  • allowed_lot_ids

Back to entity