From 50ab1817620253c6090f0a9aa5fcaed4ff737f31 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 4 Jul 2018 16:24:48 +0200 Subject: [PATCH] [FIX] mail: add access_token for image from base64 and cid --- addons/mail/models/mail_thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index ffa3e795189..deb9165a6f4 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -1770,7 +1770,7 @@ class MailThread(models.AbstractModel): if not attachment: attachment = fname_mapping.get(node.get('data-filename'), '') if attachment: - node.set('src', '/web/image/%s' % attachment.id) + node.set('src', '/web/image/%s?access_token=%s' % (attachment.id, attachment.access_token)) postprocessed = True if postprocessed: body = lxml.html.tostring(root, pretty_print=False, encoding='UTF-8')