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

for inv in self:
            res = inv.onchange_payment_term_date_invoice(inv.payment_term.id, inv.date_invoice)
            if res and res.get('value'):
                inv.write(res['value'])
        return True
    @api.multi
    def finalize_invoice_move_lines(self, move_lines):
        """ finalize_invoice_move_lines(move_lines) -> move_lines
            Hook method to be overridden in additional modules to verify and
            possibly alter the move lines to be created by an invoice, for
            special cases.
            :param move_lines: list of dictionaries with the account.move.lines (as for create())
            :return: the (possibly updated) final move_lines to create for this invoice
        """
        return move_lines
    @api.multi
    def check_tax_lines(self, compute_taxes):