Impacted versions:
At least version 10, version 11(Can only re-produce the problem sometimes)

Steps to reproduce:
Please see this screencast recorded on odoo runbot.
https://youtu.be/cSPQvp9jQJc

Current behavior:
When users search by account in Journal Entries List View. A special value "dummy_account_id" is set in context, in order to facilitate search by account on account.move level.
With this context value , when users create a journal entries, the system will add default value before the creation.

https://github.com/odoo/odoo/blob/fc69b37cf710623ea215cd085e998679d8c50985/odoo/models.py#L3802

This method will set "dummy_account_id" to the previously searched account in vals.

Then the system continue creating account.move and related account.move.line records.
It is fine until the system run this:
https://github.com/odoo/odoo/blob/fc69b37cf710623ea215cd085e998679d8c50985/odoo/models.py#L3830

Since "dummy_account_id" is related field, and it now has value. The system will change the first related  account.move.line record to dummy_account_id.

Eventualy, the account is wrongly set to "dummy_account_id".

Expected behavior:
This is a feature which will fill the form field value with searched value for users. But the journal entry creation should not be affected by dummy_account_id, since it is only for searching purpose.

@Yenthe666 Would you please review this issue and help to bring related odoo staff to this issue?
'debit': amount_diff < 0 and -amount_diff or 0.0,
                'credit': amount_diff > 0 and amount_diff or 0.0,
                'account_id': rec.debit_move_id.account_id.id,
                'move_id': move.id,
                'currency_id': currency.id,
                'amount_currency': -diff_in_currency,
                'partner_id': rec.debit_move_id.partner_id.id,
            })
            rec.env['account.move.line'].create({
                'name': _('Currency exchange rate difference'),
                'debit': amount_diff > 0 and amount_diff or 0.0,
                'credit': amount_diff < 0 and -amount_diff or 0.0,
                'account_id': amount_diff > 0 and rec.company_id.currency_exchange_journal_id.default_debit_account_id.id or rec.company_id.currency_exchange_journal_id.default_credit_account_id.id,
                'move_id': move.id,
                'currency_id': currency.id,
                'amount_currency': diff_in_currency,
                'partner_id': rec.debit_move_id.partner_id.id,
            })
            for aml in aml_to_fix:
                partial_rec = rec.env['account.partial.reconcile'].create({
                    'debit_move_id': aml.credit and line_to_reconcile.id or aml.id,
                    'credit_move_id': aml.debit and line_to_reconcile.id or aml.id,
                    'amount': abs(aml.amount_residual),
                    'amount_currency': abs(aml.amount_residual_currency),
                    'currency_id': currency.id,
                })
            move.post()
        return line_to_reconcile, partial_rec
    # Do 
    def _fix_multiple_exchange_rates_diff(self, amls_to_fix, amount_diff, diff_in_currency, currency, move):