[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) <flg@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
This commit is contained in:
John Laterre (jol)
2023-07-28 12:01:54 +02:00
parent 4261024aa5
commit 9575ff9818
@@ -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):