summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml/thread.xml
diff options
context:
space:
mode:
authorJorge Pinna Puissant <jpp@odoo.com>2020-06-10 13:12:47 +0000
committerJorge Pinna Puissant <jpp@odoo.com>2020-06-12 06:48:05 +0000
commit07a3d7f31e5a77b9ff65c52d0292d7ee4595e5e4 (patch)
tree3c5e0478658b17adac54667700d945f2aeb0c1ef /addons/mail/static/src/xml/thread.xml
parent0c67025c40c0d0ac86c19638addc999e4725418f (diff)
[FIX] mail: pdfjs viewer download name
Before this commit, when downloading a pdf from the pdfjs viewer, the name of the pdf was always 'document.pdf'. Now, the correct name of the pdf is used when downloading the file. opw-2269841 closes odoo/odoo#52878 X-original-commit: b9cd32a7f19b8f73385dea534ad3cc5b126bc6dd Related: odoo/enterprise#11109 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Diffstat (limited to 'addons/mail/static/src/xml/thread.xml')
-rw-r--r--addons/mail/static/src/xml/thread.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml
index bf1c5427911..05f9f04f6f7 100644
--- a/addons/mail/static/src/xml/thread.xml
+++ b/addons/mail/static/src/xml/thread.xml
@@ -61,7 +61,7 @@
<t t-set="unique" t-value="widget.activeAttachment.checksum ? widget.activeAttachment.checksum.slice(-8) : ''"/>
<img class="o_viewer_img" t-attf-src="/web/image/#{widget.activeAttachment.id}?unique=#{unique}&amp;model=#{model}" alt="Viewer"/>
</t>
- <iframe t-if="widget.activeAttachment.fileType == 'application/pdf'" class="mt32 o_viewer_pdf" t-attf-src="/web/static/lib/pdfjs/web/viewer.html?file=/web/content/#{widget.activeAttachment.id}?model%3D#{model}" />
+ <iframe t-if="widget.activeAttachment.fileType == 'application/pdf'" class="mt32 o_viewer_pdf" t-attf-src="/web/static/lib/pdfjs/web/viewer.html?file=/web/content/#{widget.activeAttachment.id}?model%3D#{model}%26filename%3D#{window.encodeURIComponent(widget.activeAttachment.name)}" />
<iframe t-if="(widget.activeAttachment.fileType || '').indexOf('text') !== -1" class="mt32 o_viewer_text" t-attf-src="/web/content/#{widget.activeAttachment.id}?model=#{model}" />
<iframe t-if="widget.activeAttachment.fileType == 'youtu'" class="mt32 o_viewer_text" allow="autoplay; encrypted-media" width="560" height="315" t-attf-src="https://www.youtube.com/embed/#{widget.activeAttachment.youtube}"/>
<video t-if="widget.activeAttachment.fileType == 'video'" class="o_viewer_video" controls="controls">