Skip to content
Permalink
Browse files

[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 2984915

opw-1949866

closes #31866

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
  • Loading branch information...
nim-odoo committed Mar 15, 2019
1 parent 791a38a commit 36ba37a7a1c959550f5688cc69c4e7a3abd9d02a
Showing with 1 addition and 1 deletion.
  1. +1 −1 odoo/addons/base/res/res_currency.py
@@ -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)

0 comments on commit 36ba37a

Please sign in to comment.
You can’t perform that action at this time.