Fix bug on stock_lot patch

This commit is contained in:
Sergi Almacellas Abellana 2014-05-15 12:20:34 +02:00
parent f6f9708d01
commit 02673ab251
1 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@ Index: stock.py
--- ./modules/stock_lot/stock.py
+++ ./modules/stock_lot/stock.py
@@ -80,6 +80,18 @@
@@ -80,6 +80,19 @@
for move in moves:
move.check_lot()
@ -16,13 +16,14 @@ Index: stock.py
+ lot_moves.append(move)
+ else:
+ product_moves.append(move)
+ return (super(Move, cls).assign_try(product_moves, grouping=grouping)
+ and super(Move, cls).assign_try(lot_moves, grouping=('product', 'lot')))
+ return (super(Move, cls).assign_try(lot_moves,
+ grouping=('product', 'lot')) and super(Move, cls).assign_try(
+ product_moves, grouping=grouping))
+
class ShipmentIn:
__name__ = 'stock.shipment.in'
@@ -121,6 +133,8 @@
@@ -121,6 +134,8 @@
outgoing_moves = outgoing_by_product[move.product.id]
while outgoing_moves and quantity > 0:
out_move = outgoing_moves.pop()
@ -31,4 +32,3 @@ Index: stock.py
out_quantity = Uom.compute_qty(out_move.uom,
out_move.quantity, out_move.product.default_uom,
round=False)