summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Francois <tfr@openerp.com>2020-02-24 09:39:40 +0000
committerThibault Francois <tfr@openerp.com>2020-02-24 11:50:06 +0000
commitc78bfb1da9431e90500af1c54efb182b57ecf13a (patch)
tree67f7732b1b057971efa284c68b13ce939a93f9e9
parent70b207fe3279accaa6af8755554c2b21c5245de9 (diff)
[FIX] account_payment: send amount in right currency
While sending payment request to acquirer the amount used was the amout_residual_signed This amound is in the currency of the company and may be negative. The currency send to the acquirer is the currency on the invoice so you expect the amount to be in the same currency and being positive amount_residual is exactly that amount Solution: user amount_residual instead of amount_residual_signed closes odoo/odoo#46082 X-original-commit: 1d1d5e27b4ad9f5ecbca60d8dacd4620d25dda99 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
-rw-r--r--addons/account_payment/models/payment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account_payment/models/payment.py b/addons/account_payment/models/payment.py
index 8dd98f98285..decad0d034a 100644
--- a/addons/account_payment/models/payment.py
+++ b/addons/account_payment/models/payment.py
@@ -20,7 +20,7 @@ class PaymentTransaction(models.Model):
values.update(render_values)
return self.acquirer_id.with_context(submit_class='btn btn-primary', submit_txt=submit_txt or _('Pay Now')).sudo().render(
self.reference,
- invoice.amount_residual_signed,
+ invoice.amount_residual,
invoice.currency_id.id,
values=values,
)