From 9575ff9818e35a723f564b2c73addd40e4e9682a Mon Sep 17 00:00:00 2001 From: "John Laterre (jol)" Date: Thu, 27 Jul 2023 13:27:59 +0000 Subject: [PATCH] [FIX] account: journal dashboard action_open A recent [fix](https://github.com/odoo/odoo/commit/bbcb925f88cbdc34532894918e50fd11afe7a95d) introduced a bug when trying to open the miscellaneous operations journal from the accounting dashboard. A `TypeError: unsupported operand type(s) for +: 'bool' and 'list'` was raised, which is why an empty list is used when `action['domain']` is falsy. Internal bug report. closes odoo/odoo#129957 X-original-commit: ac6eee7e6c5a32b06ea9f7f21cf13623c5c85d13 Signed-off-by: Florian Gilbert (flg) Signed-off-by: John Laterre (jol) --- addons/account/models/account_journal_dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index bdd7046db4f..2f469383b8b 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -687,7 +687,7 @@ class account_journal(models.Model): elif self.type == 'purchase': action['domain'] = [(domain_type_field, 'in', ('in_invoice', 'in_refund', 'in_receipt', 'entry'))] - action['domain'] = action['domain'] + [('journal_id', '=', self.id)] + action['domain'] = (action['domain'] or []) + [('journal_id', '=', self.id)] return action def open_spend_money(self):