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?
addons/account/models/account_move.py
""" Create new move lines from new_mv_line_dicts (if not empty) then call reconcile_partial on self and new move lines
            :param new_mv_line_dicts: list of dicts containing values suitable fot account_move_line.create()
        """
        if len(self) < 1 or len(self) + len(new_mv_line_dicts) < 2:
            raise UserError(_('A reconciliation must involve at least 2 move lines.'))
        # Cr
        if len(new_mv_line_dicts) > 0:
            writeoff_lines = self.env['account.move.line']
            company_currency = self[0].account_id.company_id.currency_id
            writeoff_currency = self[0].currency_id or company_currency
            for mv_line_dict in new_mv_line_dicts:
                if writeoff_currency != company_currency:
                    mv_line_dict['debit'] = writeoff_currency.compute(mv_line_dict['debit'], company_currency)
                    mv_line_dict['credit'] = writeoff_currency.compute(mv_line_dict['credit'], company_currency)
                writeoff_lines += self._create_writeoff(mv_line_dict)