Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions document_url/static/src/js/url.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ patch(AttachmentList.prototype, {
*
* @returns {String}
*/
canDownload(attachment) {
return (
super.canDownload(attachment) && attachment.mimetype != "application/link"
);
},
get attachmentUrl() {
return url("/web/content", {
id: this.attachment.id,
Expand Down
6 changes: 0 additions & 6 deletions document_url/static/src/xml/url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@
</xpath>
</t>
<t t-inherit="mail.AttachmentList" t-inherit-mode="extension">
<xpath
expr="//div[contains(@class, 'o-mail-AttachmentCard-aside')]//button[@title='Download']"
position="attributes"
>
<attribute name="t-if">attachment.mimetype != 'application/link'</attribute>
</xpath>
<xpath
expr="//div[hasclass('o-mail-AttachmentCard-aside')]//button[@title='Download']"
position="after"
Expand Down
Loading