diff --git a/issue10467.diff b/issue10467.diff new file mode 100644 index 0000000..249aa91 --- /dev/null +++ b/issue10467.diff @@ -0,0 +1,24 @@ +diff -r 8a6a82c717d6 stock.py +--- a/trytond/trytond/modules/stock_lot/stock.py Tue Jul 10 12:57:12 2018 +0200 ++++ b/trytond/trytond/modules/stock_lot/stock.py Tue Jul 10 12:58:45 2018 +0200 +@@ -159,6 +159,20 @@ + 'lot_required': 'Lot is required for move of product "%s".', + }) + ++ @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) ++ return (super(Move, cls).assign_try(lot_moves, ++ with_childs=with_childs, grouping=('product', 'lot')) ++ & super(Move, cls).assign_try(product_moves, ++ with_childs=with_childs, grouping=grouping)) ++ + def check_lot(self): + "Check if lot is required" + if (self.state == 'done' diff --git a/series b/series index 508ab01..2d789bf 100644 --- a/series +++ b/series @@ -16,3 +16,4 @@ search_warehouse.diff #[stock] search function for warehouse. stock_consignment_create_invoice_lines_on_move_done.diff # [stock_consignment] Task #034628: stock_consignment only create invoice lines on move done issue240_631.diff # [stock_lot] stock_by_locations get all locations with that lot. +issue10467.diff # stock_lot: add lot to grouping if lot it's required on product