Browse Source

Merge PR #343 into 12.0

Signed-off-by alexey-pelykh
12.0
OCA-git-bot 4 years ago
parent
commit
436ef7b8d5
  1. 5
      account_bank_statement_import_online_transferwise/models/online_bank_statement_provider_transferwise.py

5
account_bank_statement_import_online_transferwise/models/online_bank_statement_provider_transferwise.py

@ -1,4 +1,5 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# Copyright 2020 CorporateHub (https://corporatehub.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from dateutil.relativedelta import relativedelta
@ -169,9 +170,7 @@ class OnlineBankStatementProviderTransferwise(models.Model):
)
amount = transaction['amount']
amount_value = amount.get('value', 0)
fees_value = total_fees.get('value', Decimal()).copy_abs()
if amount_value.is_signed():
fees_value = fees_value.copy_negate()
fees_value = total_fees.get('value', Decimal()).copy_negate()
amount_value -= fees_value
unique_import_id = '%s-%s-%s' % (
transaction['type'],

Loading…
Cancel
Save