summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/models/mail_render_mixin.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-03-11 12:42:48 +0000
committerThibault Delavallée <tde@odoo.com>2020-03-24 10:25:04 +0000
commitaaefa35e29f7e87e8e914cf1d9eb68af7d26464a (patch)
tree0835ddf9cea2ffebfa0ca441411b32e3fa1db502 /addons/mass_mailing/models/mail_render_mixin.py
parent3d86a29aeb21c7e5812c988866117a495f20ebed (diff)
[MOV] link_tracker, various: more link shortening tools to mail.render.mixin
PURPOSE Move links shortening tools on mail.render.mixin to have rendering and post procesing tools available on that mixin. SPECIFICATIONS Move html and text links shortening methods on mail.render.mixin class. That way rendering and post processing is done in that mixin instead of being specific to link.tracker model. Indeed those methods are tools and not really business related methods. Future commits will improve the way mail and sms composer use the render mixin. This commit is therefore both a cleaning and preparing commit. LINKS Task ID 1963529 Community PR odoo/odoo#32397
Diffstat (limited to 'addons/mass_mailing/models/mail_render_mixin.py')
-rw-r--r--addons/mass_mailing/models/mail_render_mixin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mass_mailing/models/mail_render_mixin.py b/addons/mass_mailing/models/mail_render_mixin.py
index d38667366ed..4447f3931c8 100644
--- a/addons/mass_mailing/models/mail_render_mixin.py
+++ b/addons/mass_mailing/models/mail_render_mixin.py
@@ -15,7 +15,7 @@ class MailRenderMixin(models.AbstractModel):
# apply shortener after
if self.env.context.get('post_convert_links'):
for res_id, html in rendered.items():
- rendered[res_id] = self.env['link.tracker'].convert_links(
+ rendered[res_id] = self._shorten_links(
html,
self.env.context['post_convert_links'],
blacklist=['/unsubscribe_from_list']