summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2020-12-29 18:03:38 +0000
committerAndrea Grazioso (agr-odoo) <agr@odoo.com>2021-01-04 14:02:25 +0000
commitf4e67d8ae174d7e2ee75a1de1083b31a6ff2af8b (patch)
tree156e64659e9dc708bc0e81002d7c1766f98d43d2 /addons
parent640610a39b7acc6a2840443e895266e8a64320a6 (diff)
[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#63895 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/account/models/account_journal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account_journal.py b/addons/account/models/account_journal.py
index 819543fd251..f3d88c71d06 100644
--- a/addons/account/models/account_journal.py
+++ b/addons/account/models/account_journal.py
@@ -67,7 +67,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',