From 8e98d71f3630ef8a24043d92caa6cad6666ade46 Mon Sep 17 00:00:00 2001 From: alt-odoo Date: Fri, 6 Mar 2020 11:46:58 +0000 Subject: [PATCH] [FIX] payment_paypal: missing parentheses in mc_gross computation This is a small fixup of previous commit 581020c733044b52cacd0d41a6a8eb8708671d0d. closes odoo/odoo#47127 X-original-commit: e1e224bbf880718bcfb8d3874bad003aef5e8a27 Signed-off-by: Alex Tuyls --- addons/payment_paypal/models/payment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/payment_paypal/models/payment.py b/addons/payment_paypal/models/payment.py index a002768a309..38fdb2422ce 100644 --- a/addons/payment_paypal/models/payment.py +++ b/addons/payment_paypal/models/payment.py @@ -157,7 +157,7 @@ class TxPaypal(models.Model): invalid_parameters.append(('txn_id', data.get('txn_id'), self.acquirer_reference)) # check what is buyed if float_compare(float(data.get('mc_gross', '0.0')), (self.amount + self.fees), 2) != 0: - invalid_parameters.append(('mc_gross', data.get('mc_gross'), '%.2f' % self.amount + self.fees)) # mc_gross is amount + fees + invalid_parameters.append(('mc_gross', data.get('mc_gross'), '%.2f' % (self.amount + self.fees))) # mc_gross is amount + fees if data.get('mc_currency') != self.currency_id.name: invalid_parameters.append(('mc_currency', data.get('mc_currency'), self.currency_id.name)) if 'handling_amount' in data and float_compare(float(data.get('handling_amount')), self.fees, 2) != 0: