[FIX] account: remove default journal in cut-off

The journal in a cut-off has to be of type general. But there is an
issue at the moment where a default_journal_id would be provided in
the context (coming from the dashboard for example) and thus, fill
the journal in the cut-off wizard with a wrong value (vendor bill for
example).

This change make sure no default values are provided to the wizard.

closes odoo/odoo#87179

X-original-commit: 5b099bf6135b2ff517078d1839b513da7830f718
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
This commit is contained in:
Nicolas (vin)
2022-03-24 17:12:30 +01:00
parent e759e02ff3
commit 7d0e3cd7e3
+1
View File
@@ -5601,6 +5601,7 @@ class AccountMoveLine(models.Model):
# Force the values of the move line in the context to avoid issues
ctx = dict(self.env.context)
ctx.pop('active_id', None)
ctx.pop('default_journal_id', None)
ctx['active_ids'] = self.ids
ctx['active_model'] = 'account.move.line'
action['context'] = ctx