From 1febb882acbd0638439d67b0e8518c27554a38fe Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 29 Dec 2020 18:03:38 +0000 Subject: [PATCH] [FIX] account: Bank account not selectable Steps to reproduce the bug: An account with the type "Credit Card" can not be chosen for the creation of a journal with the type "Bank" as the domain for bank account filter only for accounts with the type "Bank and Cash" As the filter on the `user_type_id` is too restrictive we remove it in case the journal is bank or cash Bug: Impossible to select the correct account. opw-2394959 closes odoo/odoo#64288 X-original-commit: f4e67d8ae174d7e2ee75a1de1083b31a6ff2af8b Signed-off-by: oco-odoo Signed-off-by: Simon Goffin (sig) --- addons/account/models/account_journal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_journal.py b/addons/account/models/account_journal.py index f6507940e82..7097ec55800 100644 --- a/addons/account/models/account_journal.py +++ b/addons/account/models/account_journal.py @@ -77,7 +77,7 @@ class AccountJournal(models.Model): comodel_name='account.account', check_company=True, copy=False, ondelete='restrict', string='Default Account', domain="[('deprecated', '=', False), ('company_id', '=', company_id)," - "('user_type_id', '=', default_account_type)," + "'|', ('user_type_id', '=', default_account_type), ('user_type_id', 'in', type_control_ids)," "('user_type_id.type', 'not in', ('receivable', 'payable'))]") payment_debit_account_id = fields.Many2one( comodel_name='account.account', check_company=True, copy=False, ondelete='restrict',