Skip to content

Commit

Permalink
Merge PR #718 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Sep 25, 2024
2 parents 8a54e8d + 7bd1b3d commit 0a1f876
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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,
Expand All @@ -125,8 +122,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,
}
Expand All @@ -153,7 +151,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,
}
)
Expand Down

0 comments on commit 0a1f876

Please sign in to comment.