diff options
| author | Julien Castiaux <juc@odoo.com> | 2019-06-13 11:46:15 +0000 |
|---|---|---|
| committer | Julien Castiaux <juc@odoo.com> | 2019-06-13 13:22:22 +0000 |
| commit | dad9265d69a2e9ab21ea37cc15f7cd5f5d93afcf (patch) | |
| tree | be72017737cab02f8954283204ae7f1e82c16ea3 /addons | |
| parent | ea064c81c92368951705cdc4325ed10b8add2cca (diff) | |
[FIX] project: correct filename on portal attachment
Create a project visible to a portal customer, create a task and attach
an attachment. As a portal user, go to the task and download the
attachment, the downloaded filename is the numeric identifier of the
document instead of the document filename.
The `?download=true` force the download of the attachment and correctly
set the filename.
opw-2008517
closes odoo/odoo#34098
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/project/views/project_portal_templates.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/project/views/project_portal_templates.xml b/addons/project/views/project_portal_templates.xml index 14498944913..1bb202f8fd8 100644 --- a/addons/project/views/project_portal_templates.xml +++ b/addons/project/views/project_portal_templates.xml @@ -238,7 +238,7 @@ <div class="row"> <div t-attf-class="col {{'col-lg-6' if not task.description else 'col-lg-12'}}"> <ul class="list-group"> - <a class="list-group-item list-group-item-action d-flex align-items-center oe_attachments py-1 px-2" t-foreach='task.attachment_ids' t-as='attachment' t-attf-href="/web/content/#{attachment.id}" target="_blank" data-no-post-process=""> + <a class="list-group-item list-group-item-action d-flex align-items-center oe_attachments py-1 px-2" t-foreach='task.attachment_ids' t-as='attachment' t-attf-href="/web/content/#{attachment.id}?download=true" target="_blank" data-no-post-process=""> <div class='oe_attachment_embedded o_image o_image_small mr-2 mr-lg-3' t-att-title="attachment.name" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/50x40"/> <div class='oe_attachment_name text-truncate'><t t-esc='attachment.name'/></div> </a> |
