Hello community,

here is the log from the commit of package trytond_currency for 
openSUSE:Factory checked in at 2019-08-28 18:36:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond_currency (Old)
 and      /work/SRC/openSUSE:Factory/.trytond_currency.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond_currency"

Wed Aug 28 18:36:26 2019 rev:6 rq:726598 version:4.6.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond_currency/trytond_currency.changes        
2019-01-21 10:49:45.924062429 +0100
+++ 
/work/SRC/openSUSE:Factory/.trytond_currency.new.7948/trytond_currency.changes  
    2019-08-28 18:36:27.741273478 +0200
@@ -1,0 +2,5 @@
+Tue Aug 20 20:33:30 UTC 2019 - Axel Braun <[email protected]>
+
+- Version 4.6.2 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond_currency-4.6.1.tar.gz

New:
----
  trytond_currency-4.6.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ trytond_currency.spec ++++++
--- /var/tmp/diff_new_pack.2DkkIU/_old  2019-08-28 18:36:28.625273324 +0200
+++ /var/tmp/diff_new_pack.2DkkIU/_new  2019-08-28 18:36:28.629273324 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package trytond_currency
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2014-2016 Dr. Axel Braun
 #
 # All modifications and additions to the file contributed by third parties
@@ -19,7 +19,7 @@
 
 %define majorver 4.6
 Name:           trytond_currency
-Version:        %{majorver}.1
+Version:        %{majorver}.2
 Release:        0
 Summary:        The "currency" module for the Tryton ERP system
 License:        GPL-3.0-only

++++++ trytond_currency-4.6.1.tar.gz -> trytond_currency-4.6.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_currency-4.6.1/.hgtags 
new/trytond_currency-4.6.2/.hgtags
--- old/trytond_currency-4.6.1/.hgtags  2018-05-08 22:23:18.000000000 +0200
+++ new/trytond_currency-4.6.2/.hgtags  2019-08-17 12:20:39.000000000 +0200
@@ -18,3 +18,4 @@
 d4fc685791a019ef21d9ad07f71fceedfe20617b 4.4.0
 c4daf829907762ea5be11110226afe2ea345552a 4.6.0
 3a44baf4bbc5ec3836c29fc9531a1e9526a8e1d6 4.6.1
+3a5e145c8261d01372f5b03fe6da47ee5bb6a2a2 4.6.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_currency-4.6.1/CHANGELOG 
new/trytond_currency-4.6.2/CHANGELOG
--- old/trytond_currency-4.6.1/CHANGELOG        2018-05-08 22:23:17.000000000 
+0200
+++ new/trytond_currency-4.6.2/CHANGELOG        2019-08-17 12:20:39.000000000 
+0200
@@ -1,3 +1,6 @@
+Version 4.6.2 - 2019-08-17
+* Bug fixes (see mercurial logs for details)
+
 Version 4.6.1 - 2018-05-08
 * Bug fixes (see mercurial logs for details)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_currency-4.6.1/COPYRIGHT 
new/trytond_currency-4.6.2/COPYRIGHT
--- old/trytond_currency-4.6.1/COPYRIGHT        2018-05-08 22:23:17.000000000 
+0200
+++ new/trytond_currency-4.6.2/COPYRIGHT        2019-08-17 12:20:39.000000000 
+0200
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2018 Cédric Krier.
+Copyright (C) 2008-2019 Cédric Krier.
 Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2018 B2CK SPRL.
+Copyright (C) 2008-2019 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_currency-4.6.1/PKG-INFO 
new/trytond_currency-4.6.2/PKG-INFO
--- old/trytond_currency-4.6.1/PKG-INFO 2018-05-08 22:23:18.000000000 +0200
+++ new/trytond_currency-4.6.2/PKG-INFO 2019-08-17 12:20:40.000000000 +0200
@@ -1,13 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_currency
-Version: 4.6.1
+Version: 4.6.2
 Summary: Tryton module with currencies
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: [email protected]
 License: GPL-3
 Download-URL: http://downloads.tryton.org/4.6/
-Description-Content-Type: UNKNOWN
 Description: trytond_currency
         ================
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_currency-4.6.1/currency.py 
new/trytond_currency-4.6.2/currency.py
--- old/trytond_currency-4.6.1/currency.py      2018-04-13 20:22:54.000000000 
+0200
+++ new/trytond_currency-4.6.2/currency.py      2019-08-11 22:33:26.000000000 
+0200
@@ -3,7 +3,7 @@
 import datetime
 import json
 
-from decimal import Decimal, ROUND_HALF_EVEN
+from decimal import Decimal, ROUND_HALF_EVEN, localcontext
 from trytond.model import ModelView, ModelSQL, fields, Unique, Check
 from trytond.tools import datetime_strftime
 from trytond.transaction import Transaction
@@ -196,8 +196,12 @@
 
     def round(self, amount, rounding=ROUND_HALF_EVEN):
         'Round the amount depending of the currency'
-        return (amount / self.rounding).quantize(Decimal('1.'),
-                rounding=rounding) * self.rounding
+        with localcontext() as ctx:
+            ctx.prec = max(ctx.prec, (amount / self.rounding).adjusted() + 1)
+            # Divide and multiple by rounding for case rounding is not 10En
+            result = (amount / self.rounding).quantize(Decimal('1.'),
+                    rounding=rounding) * self.rounding
+        return Decimal(result)
 
     def is_zero(self, amount):
         'Return True if the amount can be considered as zero for the currency'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_currency-4.6.1/tryton.cfg 
new/trytond_currency-4.6.2/tryton.cfg
--- old/trytond_currency-4.6.1/tryton.cfg       2018-04-13 20:22:54.000000000 
+0200
+++ new/trytond_currency-4.6.2/tryton.cfg       2018-08-20 22:55:18.000000000 
+0200
@@ -1,5 +1,5 @@
 [tryton]
-version=4.6.1
+version=4.6.2
 depends:
     ir
     res
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/trytond_currency-4.6.1/trytond_currency.egg-info/PKG-INFO 
new/trytond_currency-4.6.2/trytond_currency.egg-info/PKG-INFO
--- old/trytond_currency-4.6.1/trytond_currency.egg-info/PKG-INFO       
2018-05-08 22:23:18.000000000 +0200
+++ new/trytond_currency-4.6.2/trytond_currency.egg-info/PKG-INFO       
2019-08-17 12:20:40.000000000 +0200
@@ -1,13 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-currency
-Version: 4.6.1
+Version: 4.6.2
 Summary: Tryton module with currencies
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: [email protected]
 License: GPL-3
 Download-URL: http://downloads.tryton.org/4.6/
-Description-Content-Type: UNKNOWN
 Description: trytond_currency
         ================
         


Reply via email to