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_package_ids

View 20.0
Inputs Method Outputs
  • move_line_ids
  • move_line_ids.package_history_id
  • state
  • move_line_ids.result_package_id
  • move_line_ids.result_package_id.outermost_package_id
+ for move in self:
+             package_history = move.move_line_ids.package_history_id
+             if move.state in ['done', 'cancel'] and package_history:
+                 move.package_ids = package_history.outermost_dest_id
+             else:
+                 # Only display the top-level packages until the move is done.
+                 move.package_ids = move.move_line_ids.result_package_id.outermost_package_id
  • package_ids

Back to entity