From 49cc650205c5ca7869a69a832f184fd7c20445b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 29 Nov 2014 10:55:58 +0100 Subject: [PATCH] Fix wrong default rounding of quantity for invoice The default digits of quantity is 2 so the default rounding must be 0.01 issue4374 review11671003 --- purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase.py b/purchase.py index 41a501c3d3..436f801eee 100644 --- a/purchase.py +++ b/purchase.py @@ -1261,7 +1261,7 @@ class PurchaseLine(ModelSQL, ModelView): quantity -= Uom.compute_qty(old_invoice_line.unit, old_invoice_line.quantity, self.unit) - rounding = self.unit.rounding if self.unit else 0 + rounding = self.unit.rounding if self.unit else 0.01 invoice_line.quantity = Uom.round(quantity, rounding) if invoice_line.quantity <= 0: return []