Impacted versions:

At least 8.0

Steps to reproduce:

See https://youtu.be/kmXVzf3ApaM

Current behavior:

Currently if you validate an invoice (even with an invoice date) after the initial conversion rate has changed
(if the rate is changed between creation and validation). The tax amount and the credit/debit amount is not computed from the same rate.

This one is responsible for several production issues for tax reporting for the fiscal administration.

Expected behavior:

The tax amount and the credit/debit amount must be computed from the same rate.

Video/Screenshot link (optional):

https://youtu.be/kmXVzf3ApaM

Related issue : https://github.com/odoo/odoo/issues/13473

My proposal to fix this one : https://github.com/odoo/odoo/pull/13621

inv_type = self._context.get('type', 'out_invoice')
        inv_types = inv_type if isinstance(inv_type, list) else [inv_type]
        company_id = self._context.get('company_id', self.env.user.company_id.id)
        domain = [
            ('type', 'in', filter(None, map(TYPE2JOURNAL.get, inv_types))),
            ('company_id', '=', company_id),
        ]
        return self.env['account.journal'].search(domain, limit=1)
    @api.model
    def _default_currency(self):
        journal = self._default_journal()
        return journal.currency or journal.company_id.currency_id
    @api.model
    @api.returns('account.analytic.journal', lambda r: r.id)
    def _get_journal_analytic(self, inv_type):
        """ Return the analytic journal corresponding to the given invoice type. """
        type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale', 'in_refund': 'purchase'}
        journal_type = type2journal.get(inv_type, 'sale')
        journal = self.env['account.analytic.journal'].search([('type', '=', journal_type)], limit=1)
        if not journal:
            raise except_orm(_('No Analytic Journal!'),
                _("You must define an analytic journal of type '%s'!") % (journal_type,))
        return journal[0]
    @api.one
    @api.depends('account_id', 'move_id.line_id.account_id', 'move_id.line_id.reconcile_id')
    def _compute_reconciled(self):