[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 <oco-odoo@users.noreply.github.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
Goffin Simon
2021-01-08 17:33:09 +00:00
committed by Andrea Grazioso (agr-odoo)
parent 237574c48c
commit 1febb882ac
+1 -1
View File
@@ -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',