From e2ef93a0557ecd9fa8ef39d8464b09693fb30d81 Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Mon, 23 Sep 2024 08:55:55 +0200 Subject: [PATCH 1/2] [FIX] account_statement_import_online_qonto : fix import Fix accounting entry number fix statement line description fix foreign currency import --- .../models/online_bank_statement_provider_qonto.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py b/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py index 262217efe..75f6e96de 100644 --- a/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py +++ b/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py @@ -125,8 +125,9 @@ def _qonto_prepare_statement_line( vals_line = { "sequence": sequence, "date": date, - "name": " - ".join([x for x in payment_ref_list if x]) or "/", - "ref": transaction["reference"], + "payment_ref": " - ".join([x for x in payment_ref_list if x]) or "/", + "narration": transaction["note"], + "transaction_type": transaction["operation_type"], "unique_import_id": transaction["transaction_id"], "amount": transaction["amount"] * side, } @@ -153,7 +154,7 @@ def _qonto_prepare_statement_line( if journal_currency.id != line_currency_id: vals_line.update( { - "currency_id": line_currency_id, + "foreign_currency_id": line_currency_id, "amount_currency": transaction["local_amount"] * side, } ) From 7bd1b3da2211c3681cdb0a4f9f3aa37ba783536c Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Mon, 23 Sep 2024 08:56:29 +0200 Subject: [PATCH 2/2] [FIX] account_statement_import_online_qonto : Remove verify = false in calls to qonto --- .../models/online_bank_statement_provider_qonto.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py b/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py index 75f6e96de..efbe6d810 100644 --- a/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py +++ b/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py @@ -54,9 +54,7 @@ def _qonto_header(self): def _qonto_get_slug(self): self.ensure_one() url = QONTO_ENDPOINT + "/organizations/%7Bid%7D" - response = requests.get( - url, verify=False, headers=self._qonto_header(), timeout=10 - ) + response = requests.get(url, headers=self._qonto_header(), timeout=10) if response.status_code == 200: data = json.loads(response.text) res = {} @@ -101,7 +99,6 @@ def _qonto_obtain_transactions(self, slug, date_since, date_until): def _qonto_get_transactions(self, url, params): response = requests.get( url, - verify=False, params=params, headers=self._qonto_header(), timeout=10,