diff --git a/odoo/addons/base/models/res_currency.py b/odoo/addons/base/models/res_currency.py index 99a45828a968a..052ffd66319bf 100644 --- a/odoo/addons/base/models/res_currency.py +++ b/odoo/addons/base/models/res_currency.py @@ -62,7 +62,7 @@ def _get_rates(self, company, date): @api.depends('rate_ids.rate') def _compute_current_rate(self): - date = self._context.get('date') or fields.Date.today() + date = self._context.get('date') or fields.Date.context_today(self) company = self.env['res.company'].browse(self._context.get('company_id')) or self.env.company # the subquery selects the last rate before 'date' for the given currency/company currency_rates = self._get_rates(company, date)