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

addons/account/account_invoice.py
if not date_invoice:
            date_invoice = fields.Date.context_today(self)
        if not payment_term_id:
            
            
            return {'value': {'date_due': self.date_due or date_invoice}}
        pterm = self.env['account.payment.term'].browse(payment_term_id)
        pterm_list = pterm.compute(value=1, date_ref=date_invoice)[0]
        if pterm_list:
            return {'value': {'date_due': max(line[0] for line in pterm_list)}}
        else:
            raise except_orm(_('Insufficient Data!'),
                _('The payment term of supplier does not have a payment term line.'))
    @api.multi
    def onchange_invoice_line(self, lines):
        return {}
    @api.multi
    def onchange_partner_bank(self, partner_bank_id=False):
        return {'value': {}}
    @api.multi
    def onchange_company_id(self, company_id, part_id, type, invoice_line, currency_id):
        
        
        self = self.with_context(self.env['res.users'].context_get())
        values = {}
        domain = {}
        if company_id and part_id and type:
            p = self.env['res.partner'].browse(part_id)