[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
This commit is contained in:
Nicolas Lempereur
2016-06-16 12:14:59 +02:00
parent baf494c67b
commit 50136a1404
+1 -1
View File
@@ -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')