[IMP] account_bank_statement_import_online_qonto: pre-commit stuff

This commit is contained in:
Carolina Fernandez
2024-04-08 15:34:07 +02:00
parent 952aa321b0
commit 74c14c920e
4 changed files with 17 additions and 3 deletions

View File

@@ -26,13 +26,19 @@ class OnlineBankStatementProviderQonto(models.Model):
def _obtain_statement_data(self, date_since, date_until):
self.ensure_one()
if self.service != "qonto":
return super()._obtain_statement_data(date_since, date_until,)
return super()._obtain_statement_data(
date_since,
date_until,
)
return self._qonto_obtain_statement_data(date_since, date_until)
def _get_statement_date(self, date_since, date_until):
self.ensure_one()
if self.service != "qonto":
return super()._get_statement_date(date_since, date_until,)
return super()._get_statement_date(
date_since,
date_until,
)
return date_since.astimezone(pytz.timezone("Europe/Paris")).date()
#########

View File

@@ -122,7 +122,8 @@ class TestAccountBankAccountStatementImportOnlineQonto(common.TransactionCase):
def test_qonto(self):
with self.mock_transaction(), self.mock_slug():
lines, statement_values = self.provider._obtain_statement_data(
datetime(2020, 4, 15), datetime(2020, 4, 17),
datetime(2020, 4, 15),
datetime(2020, 4, 17),
)
self.assertEqual(len(lines), 2)

View File

@@ -0,0 +1 @@
../../../../account_bank_statement_import_online_qonto

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)