From 7d0e3cd7e3e2d98104e34dbe7d2c5fd4d422fdd2 Mon Sep 17 00:00:00 2001 From: "Nicolas (vin)" Date: Mon, 21 Feb 2022 14:15:49 +0000 Subject: [PATCH] [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 Signed-off-by: Nicolas Viseur --- addons/account/models/account_move.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index d21f307f8ec..fadebb60cc4 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -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