From fdbbfd06d693693b44b3b8b2b85d2c6e569c36b2 Mon Sep 17 00:00:00 2001 From: Bruno-brsy Date: Wed, 2 Feb 2022 12:09:48 +0000 Subject: [PATCH] [FIX] account: bank suspense accounts Step to reproduce: - Install account_accountant - Go to Accounting / Configuration / Accounting / Journals - Create a Journals in Accounting - Select a type as "Bank" Issue: Since this PR: https://github.com/odoo/odoo/pull/81071 The bank suspense account has been changed from "Current Liabilities" type to "Current Assets", but isn't being correctly updated in the journals view. Solution: In the domain of the "suspense_account_id", we should use "data_account_type_current_assets" for the "user_type_id" instead of "data_account_type_current_liabilities" opw-2715621 closes odoo/odoo#85105 X-original-commit: c16bc3192fe8ea033144c9cb6ab5b8c6db21d735 Signed-off-by: Quentin De Paoli Signed-off-by: Bruno-brsy --- 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 e4520976c7f..3b2add525f4 100644 --- a/addons/account/models/account_journal.py +++ b/addons/account/models/account_journal.py @@ -83,7 +83,7 @@ class AccountJournal(models.Model): "allowing finding the right account.", string='Suspense Account', domain=lambda self: "[('deprecated', '=', False), ('company_id', '=', company_id), \ ('user_type_id.type', 'not in', ('receivable', 'payable')), \ - ('user_type_id', '=', %s)]" % self.env.ref('account.data_account_type_current_liabilities').id) + ('user_type_id', '=', %s)]" % self.env.ref('account.data_account_type_current_assets').id) restrict_mode_hash_table = fields.Boolean(string="Lock Posted Entries with Hash", help="If ticked, the accounting entry or invoice receives a hash as soon as it is posted and cannot be modified anymore.") sequence = fields.Integer(help='Used to order Journals in the dashboard view', default=10)