[tryton-debian-vcs] tryton-modules-product branch debian-jessie-2.8 updated. debian/2.8.3-1-2-g5915f35

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Jul 15 14:21:21 UTC 2015


The following commit has been merged in the debian-jessie-2.8 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-product.git;a=commitdiff;h=debian/2.8.3-1-2-g5915f35

commit 5915f3525a313190b1baefbda2224bf2a86d0f45
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jul 15 12:53:11 2015 +0200

    Releasing debian version 2.8.4-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index 76f11ae..dc95517 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-product (2.8.4-1) unstable; urgency=medium
+
+  * Merging upstream version 2.8.4.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 15 Jul 2015 12:53:11 +0200
+
 tryton-modules-product (2.8.3-1) unstable; urgency=medium
 
   * Merging upstream version 2.8.3.
commit 40e9e01641c2f825577c41762ada2cf87905eef5
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jul 15 12:53:10 2015 +0200

    Merging upstream version 2.8.4.

diff --git a/CHANGELOG b/CHANGELOG
index b0b2baa..c6808f7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.8.4 - 2015-07-13
+* Bug fixes (see mercurial logs for details)
+
 Version 2.8.3 - 2015-02-22
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 30e99c2..f1a18b5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_product
-Version: 2.8.3
+Version: 2.8.4
 Summary: Tryton module with products
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/tryton.cfg b/tryton.cfg
index 88124ec..9f79637 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.8.3
+version=2.8.4
 depends:
     ir
     res
diff --git a/trytond_product.egg-info/PKG-INFO b/trytond_product.egg-info/PKG-INFO
index b5bc93d..93ecd44 100644
--- a/trytond_product.egg-info/PKG-INFO
+++ b/trytond_product.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-product
-Version: 2.8.3
+Version: 2.8.4
 Summary: Tryton module with products
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/uom.py b/uom.py
index d8878fa..3e8e7d1 100644
--- a/uom.py
+++ b/uom.py
@@ -1,5 +1,6 @@
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
+from __future__ import division
 from decimal import Decimal
 from trytond.model import ModelView, ModelSQL, fields
 from trytond.pyson import Eval
@@ -128,7 +129,11 @@ class Uom(ModelSQL, ModelView):
 
     @staticmethod
     def round(number, precision=1.0):
-        return round(number / precision) * precision
+        i, d = divmod(precision, 1)
+        base = round(number / precision)
+        # Instead of multiply by the decimal part, we must divide by the
+        # integer to avoid precision lost due to float
+        return (base * i) + ((base / (1 / d)) if d != 0 else 0)
 
     @classmethod
     def validate(cls, uoms):
-- 
tryton-modules-product



More information about the tryton-debian-vcs mailing list