Skip to content

Commit

Permalink
[MIG] account_statement_import_online_wise: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ecino committed Feb 12, 2024
1 parent e697099 commit 4d8afe3
Show file tree
Hide file tree
Showing 21 changed files with 894 additions and 13 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

{
"name": "Online Bank Statements: Wise.com (TransferWise.com)",
"version": "13.0.1.0.0",
"version": "14.0.1.0.0",
"author": "CorporateHub, Odoo Community Association (OCA)",
"maintainers": ["alexey-pelykh"],
"website": "https://github.com/OCA/bank-statement-import",
"license": "AGPL-3",
"category": "Accounting",
"summary": "Online bank statements for Wise.com (TransferWise.com)",
"depends": ["account_bank_statement_import_online", "web_widget_dropdown_dynamic"],
"depends": ["account_statement_import_online", "web_widget_dropdown_dynamic"],
"external_dependencies": {"python": ["cryptography"]},
"data": ["views/online_bank_statement_provider.xml"],
"installable": True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ def _transferwise_transaction_to_lines(self, transaction):
date = transaction["date"]
payment_reference = details.get("paymentReference")
description = details.get("description")
note = reference_number
pay_ref = reference_number
if description:
note = "{}: {}".format(note, description)
pay_ref = "{}: {}".format(pay_ref, description)
amount = transaction["amount"]
amount_value = amount.get("value", 0)
fees_value = total_fees.get("value", Decimal())
Expand All @@ -204,7 +204,7 @@ def _transferwise_transaction_to_lines(self, transaction):
"name": payment_reference or description or "",
"amount": str(amount_value),
"date": date,
"note": note,
"payment_ref": pay_ref,
"unique_import_id": unique_import_id,
}
if recipient:
Expand Down Expand Up @@ -256,7 +256,7 @@ def _transferwise_transaction_to_lines(self, transaction):
"date": date,
"partner_name": "Wise (former TransferWise)",
"unique_import_id": "%s-FEE" % unique_import_id,
"note": _("Transaction fee for %s") % reference_number,
"payment_ref": _("Transaction fee for %s") % reference_number,
}
]
return lines
Expand Down
3 changes: 3 additions & 0 deletions account_statement_import_online_wise/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import test_account_statement_import_online_transferwise
Loading

0 comments on commit 4d8afe3

Please sign in to comment.