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
balance_cash_basis = fields.Monetary(compute='_compute_cash_basis', store=True, currency_field='company_currency_id',
        help="Technical field holding the debit_cash_basis - credit_cash_basis in order to open meaningful graph views from reports")
    amount_currency = fields.Monetary(default=0.0, help="The amount expressed in an optional other currency if it is a multi-currency entry.")
    company_currency_id = fields.Many2one('res.currency', related='company_id.currency_id', string="Company Currency", readonly=True,
        help='Utility field to express amount currency', store=True)
    currency_id = fields.Many2one('res.currency', string='Currency', default=_get_currency,
        help="The optional other currency if it is a multi-currency entry.")
    amount_residual = fields.Monetary(compute='_amount_residual', string='Residual Amount', store=True, currency_field='company_currency_id',
        help="The residual amount on a journal item expressed in the company currency.")
    amount_residual_currency = fields.Monetary(compute='_amount_residual', string='Residual Amount in Currency', store=True,
        help="The residual amount on a journal item expressed in its currency (possibly not the company currency).")
    account_id = fields.Many2one('account.account', string='Account', required=True, index=True,
        ondelete="cascade", domain=[('deprecated', '=', False)], default=lambda self: self._context.get('account_id', False))
    move_id = fields.Many2one('account.move', string='Journal Entry', ondelete="cascade",
        help="The move of this entry line.", index=True, required=True, auto_join=True)
    narration = fields.Text(related='move_id.narration', string='Narration')
    ref = fields.Char(related='move_id.ref', string='Reference', store=True, copy=False, index=True)
    payment_id = fields.Many2one('account.payment', string="Originator Payment", help="Payment that created this entry", copy=False)
    statement_id = fields.Many2one('account.bank.statement', string='Statement',
        help="The bank statement used for bank reconciliation", index=True, copy=False)
    reconciled = fields.Boolean(compute='_amount_residual', store=True)
    full_reconcile_id = fields.Many2one('account.full.reconcile', string="Matching Number", copy=False)
    matched_debit_ids = fields.One2many('account.partial.reconcile', 'credit_move_id', String='Matched Debits',
        help='Debit journal items that are matched with this journal item.')
    matched_credit_ids = fields.One2many('account.partial.reconcile', 'debit_move_id', String='Matched Credits',
        help='Credit journal items that are matched with this journal item.')
    journal_id = fields.Many2one('account.journal', related='move_id.journal_id', string='Journal',
        index=True, store=True, copy=False)  
    blocked = fields.Boolean(string='No Follow-up', default=False,
        help="You can check this box to mark this journal item as a litigation with the associated partner")