diff --git a/account_bank_statement_import_ofx/__init__.py b/account_bank_statement_import_ofx/__init__.py index 9b429614..b046ff82 100644 --- a/account_bank_statement_import_ofx/__init__.py +++ b/account_bank_statement_import_ofx/__init__.py @@ -1,2 +1 @@ -from . import models -from . import wizard +from . import models, wizard diff --git a/account_bank_statement_import_ofx/__manifest__.py b/account_bank_statement_import_ofx/__manifest__.py index 3ac95a12..e92873f4 100644 --- a/account_bank_statement_import_ofx/__manifest__.py +++ b/account_bank_statement_import_ofx/__manifest__.py @@ -11,8 +11,8 @@ "Le Filament," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/bank-statement-import", - "depends": ["account_bank_statement_import",], - "data": ["views/view_account_bank_statement_import.xml",], - "external_dependencies": {"python": ["ofxparse"],}, + "depends": ["account_bank_statement_import"], + "data": ["views/view_account_bank_statement_import.xml"], + "external_dependencies": {"python": ["ofxparse"]}, "installable": True, } diff --git a/account_bank_statement_import_ofx/static/description/icon.png b/account_bank_statement_import_ofx/static/description/icon.png old mode 100644 new mode 100755 diff --git a/account_bank_statement_import_ofx/tests/test_import_bank_statement.py b/account_bank_statement_import_ofx/tests/test_import_bank_statement.py index 752e0614..aa664642 100644 --- a/account_bank_statement_import_ofx/tests/test_import_bank_statement.py +++ b/account_bank_statement_import_ofx/tests/test_import_bank_statement.py @@ -62,7 +62,7 @@ class TestOfxFile(TransactionCase): ) ofx_file_wrong = base64.b64encode(open(ofx_file_path, "rb").read()) attach = self.ia_model.create( - {"name": "test_ofx_wrong.ofx", "datas": ofx_file_wrong,} + {"name": "test_ofx_wrong.ofx", "datas": ofx_file_wrong} ) bank_statement = self.absi_model.create( dict(attachment_ids=[(6, 0, [attach.id])]) @@ -74,7 +74,7 @@ class TestOfxFile(TransactionCase): "account_bank_statement_import_ofx", "tests/test_ofx_file/", "test_ofx.ofx" ) ofx_file = base64.b64encode(open(ofx_file_path, "rb").read()) - attach = self.ia_model.create({"name": "test_ofx.ofx", "datas": ofx_file,}) + attach = self.ia_model.create({"name": "test_ofx.ofx", "datas": ofx_file}) bank_statement = self.absi_model.create( dict(attachment_ids=[(6, 0, [attach.id])]) ) @@ -96,7 +96,7 @@ class TestOfxFile(TransactionCase): "test_ofx_iban.ofx", ) ofx_file = base64.b64encode(open(ofx_file_path, "rb").read()) - attach = self.ia_model.create({"name": "test_ofx.ofx", "datas": ofx_file,}) + attach = self.ia_model.create({"name": "test_ofx.ofx", "datas": ofx_file}) bank_st = self.absi_model.create(dict(attachment_ids=[(6, 0, [attach.id])])) journal_iban_ofx = self.j_model.search( [("name", "=", "FR7630001007941234567890185")] diff --git a/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py b/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py index 9618f43c..964c3f41 100644 --- a/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py +++ b/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py @@ -87,7 +87,8 @@ class AccountBankStatementImport(models.TransientModel): "The following problem occurred during import. " "The file might not be valid.\n\n %s" ) - % e.message + # % e.message # flake8 B306 `BaseException.message` + % e.args[0] ) balance = float(ofx.account.statement.balance)