[FIX] base: default rate

We set the default rate to be 1.0 instead of 0.0, since a rate of 0.0
doesn't make sense.

Partial backport of 298491597c

opw-1949866

closes odoo/odoo#31866

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Nicolas Martinelli
2019-03-15 09:58:51 +00:00
parent 791a38a655
commit 36ba37a7a1
+1 -1
View File
@@ -206,7 +206,7 @@ class CurrencyRate(models.Model):
name = fields.Datetime(string='Date', required=True, index=True,
default=lambda self: fields.Date.today() + ' 00:00:00')
rate = fields.Float(digits=(12, 6), help='The rate of the currency to the currency of rate 1')
rate = fields.Float(digits=(12, 6), default=1.0, help='The rate of the currency to the currency of rate 1')
currency_id = fields.Many2one('res.currency', string='Currency', readonly=True)
company_id = fields.Many2one('res.company', string='Company',
default=lambda self: self.env.user.company_id)