summaryrefslogtreecommitdiff
path: root/addons/mail/static/tests/document_viewer_tests.js
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/tests/document_viewer_tests.js
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/tests/document_viewer_tests.js')
-rw-r--r--addons/mail/static/tests/document_viewer_tests.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/tests/document_viewer_tests.js b/addons/mail/static/tests/document_viewer_tests.js
index 5ccb9df5ff3..aa50483b48a 100644
--- a/addons/mail/static/tests/document_viewer_tests.js
+++ b/addons/mail/static/tests/document_viewer_tests.js
@@ -19,7 +19,7 @@ var createViewer = function (params) {
var viewer = new DocumentViewer(parent, params.attachments, params.attachmentID);
var mockRPC = function (route) {
- if (route === '/web/static/lib/pdfjs/web/viewer.html?file=/web/content/1?model%3Dir.attachment') {
+ if (route === '/web/static/lib/pdfjs/web/viewer.html?file=/web/content/1?model%3Dir.attachment%26filename%3DfilePdf.pdf') {
return Promise.resolve();
}
if (route === 'https://www.youtube.com/embed/FYqW0Gdwbzk') {