summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_thread.py
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/mail/models/mail_thread.py
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/mail/models/mail_thread.py')
-rw-r--r--addons/mail/models/mail_thread.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py
index 2e94ea0cf44..e033cab3b63 100644
--- a/addons/mail/models/mail_thread.py
+++ b/addons/mail/models/mail_thread.py
@@ -24,7 +24,6 @@ except ImportError:
from collections import namedtuple
from email.message import EmailMessage
from lxml import etree
-from werkzeug import url_encode
from werkzeug import urls
from odoo import _, api, exceptions, fields, models, tools, registry, SUPERUSER_ID
@@ -2482,7 +2481,7 @@ class MailThread(models.AbstractModel):
token = self._notify_encode_link(base_link, params)
params['token'] = token
- link = '%s?%s' % (base_link, url_encode(params))
+ link = '%s?%s' % (base_link, urls.url_encode(params))
if self:
link = self[0].get_base_url() + link