diff --git a/stock_picking_completion_info/__manifest__.py b/stock_picking_completion_info/__manifest__.py index 29d05d60a..55093c1d1 100644 --- a/stock_picking_completion_info/__manifest__.py +++ b/stock_picking_completion_info/__manifest__.py @@ -12,6 +12,6 @@ "license": "AGPL-3", "application": False, "installable": True, - "depends": ["stock"], + "depends": ["stock_move_common_dest"], "data": ["views/stock_picking.xml"], } diff --git a/stock_picking_completion_info/models/stock_picking.py b/stock_picking_completion_info/models/stock_picking.py index 80c509604..1d61820f2 100644 --- a/stock_picking_completion_info/models/stock_picking.py +++ b/stock_picking_completion_info/models/stock_picking.py @@ -37,7 +37,7 @@ class StockPicking(models.Model): @api.depends( "picking_type_id.display_completion_info", - "move_lines.move_dest_ids.move_orig_ids.state", + "move_lines.common_dest_move_ids.state", ) def _compute_completion_info(self): for picking in self: @@ -49,9 +49,7 @@ class StockPicking(models.Model): continue # Depending moves are all the origin moves linked to the # destination pickings' moves - depending_moves = picking.move_lines.mapped( - "move_dest_ids.picking_id.move_lines.move_orig_ids" - ) + depending_moves = picking.move_lines.mapped("common_dest_move_ids") # If all the depending moves are done or canceled then next picking # is ready to be processed if all(m.state in ("done", "cancel") for m in depending_moves):