mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[pre-commit] pre-commit fix issues, only ofx module
This commit is contained in:
@@ -1,2 +1 @@
|
|||||||
from . import models
|
from . import models, wizard
|
||||||
from . import wizard
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
"Le Filament,"
|
"Le Filament,"
|
||||||
"Odoo Community Association (OCA)",
|
"Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/bank-statement-import",
|
"website": "https://github.com/OCA/bank-statement-import",
|
||||||
"depends": ["account_bank_statement_import",],
|
"depends": ["account_bank_statement_import"],
|
||||||
"data": ["views/view_account_bank_statement_import.xml",],
|
"data": ["views/view_account_bank_statement_import.xml"],
|
||||||
"external_dependencies": {"python": ["ofxparse"],},
|
"external_dependencies": {"python": ["ofxparse"]},
|
||||||
"installable": True,
|
"installable": True,
|
||||||
}
|
}
|
||||||
|
|||||||
0
account_bank_statement_import_ofx/static/description/icon.png
Normal file → Executable file
0
account_bank_statement_import_ofx/static/description/icon.png
Normal file → Executable file
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
@@ -62,7 +62,7 @@ class TestOfxFile(TransactionCase):
|
|||||||
)
|
)
|
||||||
ofx_file_wrong = base64.b64encode(open(ofx_file_path, "rb").read())
|
ofx_file_wrong = base64.b64encode(open(ofx_file_path, "rb").read())
|
||||||
attach = self.ia_model.create(
|
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(
|
bank_statement = self.absi_model.create(
|
||||||
dict(attachment_ids=[(6, 0, [attach.id])])
|
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"
|
"account_bank_statement_import_ofx", "tests/test_ofx_file/", "test_ofx.ofx"
|
||||||
)
|
)
|
||||||
ofx_file = base64.b64encode(open(ofx_file_path, "rb").read())
|
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(
|
bank_statement = self.absi_model.create(
|
||||||
dict(attachment_ids=[(6, 0, [attach.id])])
|
dict(attachment_ids=[(6, 0, [attach.id])])
|
||||||
)
|
)
|
||||||
@@ -96,7 +96,7 @@ class TestOfxFile(TransactionCase):
|
|||||||
"test_ofx_iban.ofx",
|
"test_ofx_iban.ofx",
|
||||||
)
|
)
|
||||||
ofx_file = base64.b64encode(open(ofx_file_path, "rb").read())
|
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])]))
|
bank_st = self.absi_model.create(dict(attachment_ids=[(6, 0, [attach.id])]))
|
||||||
journal_iban_ofx = self.j_model.search(
|
journal_iban_ofx = self.j_model.search(
|
||||||
[("name", "=", "FR7630001007941234567890185")]
|
[("name", "=", "FR7630001007941234567890185")]
|
||||||
|
|||||||
@@ -87,7 +87,8 @@ class AccountBankStatementImport(models.TransientModel):
|
|||||||
"The following problem occurred during import. "
|
"The following problem occurred during import. "
|
||||||
"The file might not be valid.\n\n %s"
|
"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)
|
balance = float(ofx.account.statement.balance)
|
||||||
|
|||||||
Reference in New Issue
Block a user