From 50136a1404d17aec7f1c1adf1af4897de074ccda Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 16 Jun 2016 11:34:48 +0200 Subject: [PATCH] [FIX] base: typo for default currency rate 1.0 Since 7eab8e26 rewrite in saas-10, the rate gotten when no res.currency.rate was present would be 0 which is not wanted and source of issues. It should still be 1.0 as previously. opw-681019 opw-681020 opw-681021 --- 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 dc807670cdf..080c488b378 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -48,7 +48,7 @@ class Currency(models.Model): self._cr.execute(query, (date, company_id, tuple(self.ids))) currency_rates = dict(self._cr.fetchall()) for currency in self: - currency.rate = currency_rates.get(currency.id, 1.0) + currency.rate = currency_rates.get(currency.id) or 1.0 @api.multi @api.depends('rounding')