[FIX] stock: Reversing scrapped moves

When reversing stock moves by clicking on "Reverse" in stock.picking
form view, only the stock moves not scrapped must be reversed.

opw:672236
This commit is contained in:
Goffin Simon
2016-05-12 09:22:08 +02:00
parent d8f8d345b7
commit 1876279f2f
@@ -58,6 +58,8 @@ class stock_return_picking(osv.osv_memory):
raise UserError(_("You may only return pickings that are Done!"))
for move in pick.move_lines:
if move.scrapped:
continue
if move.move_dest_id:
chained_move_exist = True
#Sum the quants in that location that can be returned (they should have been moved by the moves that were included in the returned picking)