[FIX] account: Fix traceback when opening auto entries with multilines

Introduced by:
https://github.com/odoo/odoo/commit/f9ef2c8cd980ecb9eee22d4cc43d5291953471ef

`self.id` is making an `ensure_one` raising a traceback when trying to open the wizard with more than one selected line.

closes odoo/odoo#59088

X-original-commit: 587c1d0f9bddd7bcc3d8d165d6d3073387dfe73f
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This commit is contained in:
Laurent Smet
2020-10-05 10:58:38 +00:00
parent 5d67cdc822
commit fc1fbd3fcb
+1 -1
View File
@@ -4666,7 +4666,7 @@ class AccountMoveLine(models.Model):
[action] = self.env.ref('account.account_automatic_entry_wizard_action').read()
# Force the values of the move line in the context to avoid issues
ctx = dict(self.env.context)
ctx['active_id'] = self.id
ctx.pop('active_id', None)
ctx['active_ids'] = self.ids
ctx['active_model'] = 'account.move.line'
action['context'] = ctx