summaryrefslogtreecommitdiff
path: root/addons/payment_ingenico/models
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2020-01-29 09:12:11 +0000
committerXavier Morel <xmo@odoo.com>2020-02-04 12:42:35 +0000
commitde590816d8d06730d99499db9a068f8d0e2cd3f9 (patch)
treea138df14693c2f76614e76cd26a8fcf34d0df631 /addons/payment_ingenico/models
parenteae19fc2cd3496d4b59e4d8029fcceb5eaa3a561 (diff)
[FIX] *: deprecated access to url_ utilities through werkzeug root
In 0.15 accessing werkzeug.urls functions directly through werkzeug is deprecated, the shortcut will be removed in the eventual werkzeug 1.0. Fix existing uses of these shortcuts. Also cleanup some imports when they're not far from a werkzeug* import being altered.
Diffstat (limited to 'addons/payment_ingenico/models')
-rw-r--r--addons/payment_ingenico/models/payment.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/payment_ingenico/models/payment.py b/addons/payment_ingenico/models/payment.py
index 0399ec68c46..2e719ce033c 100644
--- a/addons/payment_ingenico/models/payment.py
+++ b/addons/payment_ingenico/models/payment.py
@@ -9,7 +9,7 @@ from unicodedata import normalize
import requests
from lxml import etree, objectify
-from werkzeug import urls, url_encode
+from werkzeug import urls
from odoo import api, fields, models, _
from odoo.addons.payment.models.payment_acquirer import ValidationError
@@ -177,7 +177,7 @@ class PaymentAcquirerOgone(models.Model):
'DECLINEURL': urls.url_join(base_url, OgoneController._decline_url),
'EXCEPTIONURL': urls.url_join(base_url, OgoneController._exception_url),
'CANCELURL': urls.url_join(base_url, OgoneController._cancel_url),
- 'PARAMPLUS': url_encode(param_plus),
+ 'PARAMPLUS': urls.url_encode(param_plus),
}
if self.save_token in ['ask', 'always']:
temp_ogone_tx_values.update({
@@ -365,7 +365,7 @@ class PaymentTxOgone(models.Model):
'ECI': 9, # Recurring (from eCommerce)
'ALIAS': self.payment_token_id.acquirer_ref,
'RTIMEOUT': 30,
- 'PARAMPLUS': url_encode(param_plus),
+ 'PARAMPLUS': urls.url_encode(param_plus),
'EMAIL': self.partner_id.email or '',
'CN': self.partner_id.name or '',
}