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

args = args or []
        recs = self.browse()
        if name:
            recs = self.search([('number', '=', name)] + args, limit=limit)
        if not recs:
            recs = self.search([('name', operator, name)] + args, limit=limit)
        return recs.name_get()
    @api.model
    def _refund_cleanup_lines(self, lines):
        """ Convert records to dict of values suitable for one2many line creation
            :param recordset lines: records to convert
            :return: list of command tuple for one2many line creation [(0, 0, dict of valueis), ...]
        """
        result = []
        for line in lines:
            values = {}
            for name, field in line._fields.iteritems():
                if name in MAGIC_COLUMNS:
                    continue