trytond-patches/issue10467.diff

24 lines
813 B
Diff
Raw Normal View History

Index: stock.py
===================================================================
2015-02-19 10:21:09 +01:00
--- .a/trytond/trytond/modules/stock_lot/stock.py
+++ .b/trytond/trytond/modules/stock_lot/stock.py
@@ -80,6 +80,20 @@
for move in moves:
move.check_lot()
+ @classmethod
+ def assign_try(cls, moves, with_childs=True, grouping=('product',)):
+ lot_moves = []
+ product_moves = []
+ for move in moves:
+ if move.lot:
+ lot_moves.append(move)
+ else:
+ product_moves.append(move)
2014-05-15 12:20:34 +02:00
+ return (super(Move, cls).assign_try(lot_moves,
2015-05-04 09:26:58 +02:00
+ with_childs=with_childs, grouping=('product', 'lot'))
+ & super(Move, cls).assign_try(product_moves,
+ with_childs=with_childs, grouping=grouping))
+