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_display_assign_serial

View 19.0 View 20.0
Inputs Method Outputs
  • has_tracking
  • product_id
  • picking_type_id
  • picking_type_id.use_create_lots
  • origin_returned_move_id
  • origin_returned_move_id.id
  • state
  • display_import_lot
  • product_id.tracking
for move in self:
            move.display_import_lot = (
-                 move.has_tracking != 'none' and
+                 move.product_id.tracking in ['lot', 'serial'] and
                move.product_id and
                move.picking_type_id.use_create_lots and
                not move.origin_returned_move_id.id and
                move.state not in ('done', 'cancel')
            )
            move.display_assign_serial = move.display_import_lot
  • display_import_lot
  • display_assign_serial

Back to entity