From 5ddd39b5b7eb93bf461f3e94135431f49570dc74 Mon Sep 17 00:00:00 2001 From: Sanket Brahmbhatt Date: Thu, 30 Mar 2023 11:41:41 +0000 Subject: [PATCH] [FIX] account: prevent traceback when creating new bank account When the `account.journal.bank_statement_source` field is validated at that time it won't be able to find the `file_import` value in the options of this selection field as they are dynamically generated and the `file_import` value is generated in the `account_bank_statement_import` module which is not installed. So, it will cause Error. Steps to reproduce : 1. Install only `account` module 2. Click on Configuration > Add Bank Account. 3. Fill up the details. The `Journal` field should be left empty. 4. Click on Create. closes odoo/odoo#120923 Sentry: - 4042261837 X-original-commit: eda822ce7c3884350ecfb8bbb10accfe7ff5acf4 Signed-off-by: Brice Bartoletti (bib) --- addons/account/wizard/setup_wizards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/setup_wizards.py b/addons/account/wizard/setup_wizards.py index 6278203b35a..d4da41cc8a2 100644 --- a/addons/account/wizard/setup_wizards.py +++ b/addons/account/wizard/setup_wizards.py @@ -139,7 +139,7 @@ class SetupBarBankConfigWizard(models.TransientModel): 'type': 'bank', 'company_id': company.id, 'bank_account_id': record.res_partner_bank_id.id, - 'bank_statements_source': 'file_import', + 'bank_statements_source': 'undefined', }) else: selected_journal.bank_account_id = record.res_partner_bank_id.id