[FIX] stock: Return a returned pick set the pack to 'Available'

1) Configure the warehouse "Your company" to pick-pack-ship operation
   (you'll need to activate the advance route on WH config + set up the
   correct process through the warehouse configuration wizard.
2) Create a SO with a product (on stock) and confirm it
3) Display the deliveries, you'll have 3 : pick, pack, ship
4) Take the pick, force availability if needed, and confirm it
5) Return the pick and validate (e.g. imagine you missed something like
   puting the lot, so you want to reverse the pick).
6) Go back to the SO, click to view the deliveries
7) You create another, new, pick here (which is correct). Take it and
   confirm it.
8) Look at the pack => his state is "Waiting another operation"... This
   is not good ! We should have it "Ready to transfer" (now "Available")
   because we just (re)confirm the pick operation.

Odoo don't know he should make the next operation (pack) available.
This commit is contained in:
Jignesh Rathod
2016-03-08 11:48:35 +01:00
committed by Yannick Tivisse
parent 7ab4f6e669
commit aa02465bbf
+3 -2
View File
@@ -96,9 +96,10 @@ class stock_return_picking(osv.osv_memory):
returned_lines = 0
# Cancel assignment of existing chained assigned moves
return_moves = list(set(move.move_id for move in data_obj.browse(cr, uid, data['product_return_moves'], context=context)))
moves_to_unreserve = []
for move in pick.move_lines:
to_check_moves = [move.move_dest_id] if move.move_dest_id.id else []
for move in return_moves:
to_check_moves = [move.move_dest_id] if move.move_dest_id else []
while to_check_moves:
current_move = to_check_moves.pop()
if current_move.state not in ('done', 'cancel') and current_move.reserved_quant_ids: