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

Compute Method: _compute_show_info

View 18.0 View 20.0
Inputs Method Outputs
  • picking_code
  • product_id
  • product_id.is_storable
  • has_tracking
  • picking_type_id
  • picking_type_id.use_create_lots
  • picking_type_id.use_existing_lots
  • state
  • origin_returned_move_id
  • origin_returned_move_id.id
  • show_quant
  • show_lots_text
  • product_id.tracking
for move in self:
            move.show_quant = move.picking_code != 'incoming'\
                           and move.product_id.is_storable
-             move.show_lots_text = move.has_tracking != 'none'\
+             move.show_lots_text = move.product_id.tracking in ['lot', 'serial']\
                and move.picking_type_id.use_create_lots\
                and not move.picking_type_id.use_existing_lots\
                and move.state != 'done' \
                and not move.origin_returned_move_id.id
            move.show_lots_m2o = not move.show_quant\
                and not move.show_lots_text\
-                 and move.has_tracking != 'none'\
+                 and move.product_id.tracking in ['lot', 'serial']\
                and (move.picking_type_id.use_existing_lots or move.state == 'done' or move.origin_returned_move_id.id)
  • show_quant
  • show_lots_text
  • show_lots_m2o

Back to entity