2013-10-05 19:39:15 +02:00
|
|
|
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
|
2014-07-09 17:13:18 +02:00
|
|
|
@@ -80,6 +80,20 @@
|
2013-10-05 19:39:15 +02:00
|
|
|
for move in moves:
|
|
|
|
move.check_lot()
|
2014-11-03 14:21:20 +01:00
|
|
|
|
2013-10-05 19:39:15 +02:00
|
|
|
+ @classmethod
|
2014-07-09 17:13:18 +02:00
|
|
|
+ def assign_try(cls, moves, with_childs=True, grouping=('product',)):
|
2013-10-05 19:39:15 +02:00
|
|
|
+ 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,
|
2014-07-09 17:13:18 +02:00
|
|
|
+ with_childs=with_childs, grouping=grouping))
|
2013-10-05 19:39:15 +02:00
|
|
|
+
|