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