[FIX] mail: corrects wrong url formatting for attachment download

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) <aku@odoo.com>
This commit is contained in:
Thanh Dodeur
2020-10-14 13:37:09 +00:00
parent 3af61a49f4
commit 461c3fa91b
@@ -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 });
}
/**