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

line_ids = self.move_line_id_payment_get()
        if not line_ids:
            return False
        query = "SELECT count(*) FROM account_move_line WHERE reconcile_id IS NULL AND id IN %s"
        self._cr.execute(query, (tuple(line_ids),))
        return self._cr.fetchone()[0] == 0
    @api.multi
    def button_reset_taxes(self):
        account_invoice_tax = self.env['account.invoice.tax']
        ctx = dict(self._context)
        for invoice in self:
            self._cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s AND manual is False", (invoice.id,))
            self.invalidate_cache()
            partner = invoice.partner_id
            if partner.lang:
                ctx['lang'] = partner.lang
            for taxe in account_invoice_tax.compute(invoice.with_context(ctx)).values():
                account_invoice_tax.create(taxe)
        
        return self.with_context(ctx).write({'invoice_line': []})
    @api.multi
    def button_compute(self, set_total=False):
        self.button_reset_taxes()
        for invoice in self:
            if set_total:
                invoice.check_total = invoice.amount_total
        return True
    @api.multi
    def _get_analytic_lines(self):