diff --git a/series b/series index 2ed7a27..e2c3706 100644 --- a/series +++ b/series @@ -74,3 +74,4 @@ issue7961002_40001.diff #chart_not_translatable.diff #024726_account_bank_remove_company.diff #024726_account_payment_type_remove_company.diff +#stock_lot_improve_sync_inventory_to_outgoing.diff diff --git a/stock_lot_improve_sync_inventory_to_outgoing.diff b/stock_lot_improve_sync_inventory_to_outgoing.diff new file mode 100644 index 0000000..392874e --- /dev/null +++ b/stock_lot_improve_sync_inventory_to_outgoing.diff @@ -0,0 +1,28 @@ +diff -r 973556094501 stock.py +--- a/trytond/trytond/modules/stock_lot/stock.py Mon Oct 26 13:23:09 2015 +0100 ++++ b/trytond/trytond/modules/stock_lot/stock.py Mon Oct 26 13:45:41 2015 +0100 +@@ -133,19 +133,17 @@ + out_quantity = Uom.compute_qty(out_move.uom, + out_move.quantity, out_move.product.default_uom, + round=False) ++ out_move_vals = {} + if quantity < out_quantity: + outgoing_moves.extend(Move.copy([out_move], default={ + 'quantity': Uom.round( + out_quantity - quantity, + out_move.uom.rounding), + })) +- Move.write([out_move], { +- 'quantity': Uom.round( +- quantity, out_move.uom.rounding), +- }) +- Move.write([out_move], { +- 'lot': move.lot.id, +- }) ++ out_move_vals['quantity'] = Uom.round(quantity, ++ out_move.uom.rounding) ++ out_move_vals['lot'] = move.lot.id ++ Move.write([out_move], out_move_vals) + quantity -= out_quantity + assert quantity <= move.product.default_uom.rounding +