[FIX] Avoid endless loop when doing a return picking
This commit is contained in:
parent
ffda023295
commit
536d00d2ba
|
@ -103,7 +103,7 @@ class stock_return_picking(osv.osv_memory):
|
||||||
# Cancel assignment of existing chained assigned moves
|
# Cancel assignment of existing chained assigned moves
|
||||||
moves_to_unreserve = []
|
moves_to_unreserve = []
|
||||||
for move in pick.move_lines:
|
for move in pick.move_lines:
|
||||||
to_check_moves = [move.move_dest_id]
|
to_check_moves = [move.move_dest_id] if move.move_dest_id.id else []
|
||||||
while to_check_moves:
|
while to_check_moves:
|
||||||
current_move = to_check_moves.pop()
|
current_move = to_check_moves.pop()
|
||||||
if current_move.state not in ('done', 'cancel') and current_move.reserved_quant_ids:
|
if current_move.state not in ('done', 'cancel') and current_move.reserved_quant_ids:
|
||||||
|
|
Loading…
Reference in New Issue