Skip to content

Commit

Permalink
Merge PR #506 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 14, 2024
2 parents ea8e5fa + 0b11b08 commit 75177d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
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

0 comments on commit 75177d3

Please sign in to comment.