From 39e62670491083dd481eabe473bf740de955bb57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 2 Dec 2013 17:25:17 +0100 Subject: [PATCH] [FIX] paypal: correctly compute fees bzr revid: tde@openerp.com-20131202162517-39jdtg83l08yxdxm --- addons/payment_acquirer_paypal/models/paypal.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/payment_acquirer_paypal/models/paypal.py b/addons/payment_acquirer_paypal/models/paypal.py index b2e15f4d894..8bbd540372b 100644 --- a/addons/payment_acquirer_paypal/models/paypal.py +++ b/addons/payment_acquirer_paypal/models/paypal.py @@ -56,6 +56,8 @@ class AcquirerPaypal(osv.Model): :return float fees: computed fees """ acquirer = self.browse(cr, uid, id, context=context) + if not acquirer.fees_active: + return 0.0 country = self.pool['res.country'].browse(cr, uid, country_id, context=context) if country and acquirer.company_id.country_id.id == country.id: fees = amount * (1 + acquirer.fees_dom_var / 100.0) + acquirer.fees_dom_fixed - amount