From 35431de125a73a79f574dddb60409131179c01b5 Mon Sep 17 00:00:00 2001 From: Arthur Maniet Date: Thu, 4 Dec 2014 10:51:54 +0100 Subject: [PATCH] [FIX] res.currency: correctly compute the number of decimal places for currencies formatting in 'get_format_currencies_js_function'. --- openerp/addons/base/res/res_currency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index 8a155d9a35e..3f9c8c54bda 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -276,7 +276,7 @@ class res_currency(osv.osv): That function expects the number as first parameter and the currency id as second parameter. In case of failure it returns undefined.""" function = "" for row in self.search_read(cr, uid, domain=[], fields=['id', 'name', 'symbol', 'rounding', 'position'], context=context): - digits = int(math.log10(1 / row['rounding'])) + digits = int(math.ceil(math.log10(1 / row['rounding']))) symbol = row['symbol'] or row['name'] format_number_str = "openerp.web.format_value(arguments[0], {type: 'float', digits: [69," + str(digits) + "]}, 0.00)"