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_lot_id

View 19.0 View 20.0
Inputs Method Outputs
  • product_id
  • lot_id
  • lot_id.product_id
  • picking_id
  • picking_id.move_ids
  • picking_id.move_ids.lot_ids
for repair in self:
            if (repair.product_id and repair.lot_id and repair.lot_id.product_id != repair.product_id) or not repair.product_id:
                repair.lot_id = False
            elif len(repair.picking_id.move_ids.lot_ids) == 1:
                repair.lot_id = repair.picking_id.move_ids.lot_ids
  • lot_id

Back to entity