mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
27 lines
1.2 KiB
Diff
27 lines
1.2 KiB
Diff
diff -r fdfe606e6b87 stock.py
|
|
--- a/trytond/trytond/modules/stock_lot/stock.py Thu Feb 19 00:04:21 2015 +0100
|
|
+++ b/trytond/trytond/modules/stock_lot/stock.py Mon Oct 05 11:56:24 2015 +0200
|
|
@@ -119,16 +119,19 @@
|
|
round=False)
|
|
if quantity < out_quantity:
|
|
outgoing_moves.extend(Move.copy([out_move], default={
|
|
- 'quantity': out_quantity - quantity,
|
|
+ 'quantity': Uom.round(
|
|
+ out_quantity - quantity,
|
|
+ out_move.uom.rounding),
|
|
}))
|
|
Move.write([out_move], {
|
|
- 'quantity': quantity,
|
|
+ 'quantity': Uom.round(
|
|
+ quantity, out_move.uom.rounding),
|
|
})
|
|
Move.write([out_move], {
|
|
'lot': move.lot.id,
|
|
})
|
|
quantity -= out_quantity
|
|
- assert quantity <= 0
|
|
+ assert quantity <= move.product.default_uom.rounding
|
|
|
|
|
|
class ShipmentOutReturn:
|