From eec9c049884642648a2a8a875b8fc2a0650efab8 Mon Sep 17 00:00:00 2001 From: Carlos Roca Date: Wed, 5 Aug 2020 12:35:44 +0200 Subject: [PATCH] [FIX] account_bank_statement_import_transfer_move: Solved module crash when is charged earlier than account_bank_statement_import_camt_oca --- .../tests/test_statement.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/account_bank_statement_import_transfer_move/tests/test_statement.py b/account_bank_statement_import_transfer_move/tests/test_statement.py index 53a62209..d6ff353e 100644 --- a/account_bank_statement_import_transfer_move/tests/test_statement.py +++ b/account_bank_statement_import_transfer_move/tests/test_statement.py @@ -1,6 +1,7 @@ # Copyright 2020 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import base64 +import unittest from odoo.modules.module import get_module_resource from odoo.tests.common import SavepointCase @@ -36,6 +37,16 @@ class TestGenerateBankStatement(SavepointCase): ) def _load_statement(self): + module = self.env["ir.module.module"].search( + [ + ("name", "=", "account_bank_statement_import_camt_oca"), + ("state", "=", "installed"), + ] + ) + if not (module): + raise unittest.SkipTest( + "account_bank_statement_import_camt_oca module is not installed" + ) testfile = get_module_resource( "account_bank_statement_import_camt_oca", "test_files", "test-camt053"