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.move.line

Compute Method: _compute_lots_visible

View 19.0 View 20.0
Inputs Method Outputs
  • picking_id
  • product_id
  • product_id.tracking
for line in self:
            picking = line.picking_id
-             if picking.picking_type_id and line.product_id.tracking != 'none':  # TDE FIXME: not sure correctly migrated
+             if picking.picking_type_id and line.product_id.tracking in ['lot', 'serial']:
                line.lots_visible = picking.picking_type_id.use_existing_lots or picking.picking_type_id.use_create_lots
            else:
-                 line.lots_visible = line.product_id.tracking != 'none'
+                 line.lots_visible = line.product_id.tracking in ['lot', 'serial']
  • lots_visible

Back to entity