From 461c3fa91b8557f2bc9df6f914094ceaaa45ee8b Mon Sep 17 00:00:00 2001 From: Thanh Dodeur Date: Wed, 14 Oct 2020 09:24:12 +0000 Subject: [PATCH] [FIX] mail: corrects wrong url formatting for attachment download MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit changes the url formatting of the `services.navigate` in the attachment viewer. Before this commit, the resulting URL was erroneous which prevented download and lead to a 404 error. part of task-2171884 closes odoo/odoo#60003 X-original-commit: b11535bb26ad9a1fd96ec616201eb67c89597cdc Signed-off-by: Alexandre Kühn (aku) --- .../src/components/attachment_viewer/attachment_viewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js index f079bf65c49..1642e531758 100644 --- a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js +++ b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js @@ -146,7 +146,7 @@ class AttachmentViewer extends Component { */ _download() { const id = this.attachmentViewer.attachment.id; - this.env.services.navigate(`/web/content/ir.attachment/${id}/datas?download=true`); + this.env.services.navigate(`/web/content/ir.attachment/${id}/datas`, { download: true }); } /**