From a43781114693dfdd7d005b8abfba61882300608f Mon Sep 17 00:00:00 2001 From: Nicolas Seinlet Date: Wed, 24 Aug 2016 16:06:10 +0200 Subject: [PATCH] [FIX] stock: action_assign(reserve) should have a check to see if the move id is in the keys of the main_domain as was done in the previous loop This is needed to avoid the scheduler to stop suddenly as the scheduler takes a bunch of moves to reserve without looking if all moves of a picking are taken. That way, it is possible that a certain key is not there in this dictionary and the solution is to simply filter them out. Closes #13286 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 4438478f7f0..436b77d9920 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2461,7 +2461,7 @@ class stock_move(osv.osv): rounding = ops.product_id.uom_id.rounding for pack_lot in ops.pack_lot_ids: lot_qty[pack_lot.lot_id.id] = uom_obj._compute_qty(cr, uid, ops.product_uom_id.id, pack_lot.qty, ops.product_id.uom_id.id) - for record in ops.linked_move_operation_ids: + for record in ops.linked_move_operation_ids.filtered(lambda x: x.move_id.id in main_domain): move_qty = record.qty move = record.move_id domain = main_domain[move.id]