[FIX] stock: reverse picking in several steps
- Activate the receipt in two steps on the warehouse - Create a PO for a stockable product - Receive the product in Input zone - Receive the product in Stock - Reverse the move to Stock > products are back in Input - Reverse the move to Input You can't reserve quantities for this last move (from Input to Vendor). This is because a picking has been automatically created from the Input to Stock. Original move which is reversed: Input -> Stock When we reverse it, we don't want to send it back to Stock, so we need to check the destination location of the original move, not its location. opw-689206
This commit is contained in:
@@ -2132,7 +2132,7 @@ class stock_move(osv.osv):
|
||||
if rules:
|
||||
rule = push_obj.browse(cr, uid, rules[0], context=context)
|
||||
# Make sure it is not returning the return
|
||||
if (not move.origin_returned_move_id or move.origin_returned_move_id.location_id.id != rule.location_dest_id.id):
|
||||
if (not move.origin_returned_move_id or move.origin_returned_move_id.location_dest_id.id != rule.location_dest_id.id):
|
||||
push_obj._apply(cr, uid, rule, move, context=context)
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user