trytond-patches/stock_lot_fix_pick_product_...

13 lines
694 B
Diff

diff -r 65f34a12a887 stock.py
--- a/trytond/trytond/modules/stock_lot/stock.py Mon Nov 02 11:25:25 2015 +0100
+++ b/trytond/trytond/modules/stock_lot/stock.py Mon Nov 02 11:26:16 2015 +0100
@@ -127,7 +127,7 @@
continue
quantity = Uom.compute_qty(move.uom, move.quantity,
move.product.default_uom, round=False)
- outgoing_moves = outgoing_by_product[move.product.id]
+ outgoing_moves = outgoing_by_product.get(move.product.id, [])
while outgoing_moves and quantity > 0:
out_move = outgoing_moves.pop()
out_quantity = Uom.compute_qty(out_move.uom,