[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
This commit is contained in:
Nicolas Seinlet
2016-08-30 09:39:43 +02:00
committed by Josse Colpaert
parent e9bd2aad98
commit a437811146
+1 -1
View File
@@ -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]