I want to add a button near download in attachment to open a pdf on that button click in new tab. I am not able to extend mail.Attachment template in odoo14. Here is my code:-
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-extend="mail.Attachment">
<t>
<t t-jquery=".o_Attachment_actionDownload" t-operation="inner">
<span
class="fa fa-search ml4 o_attachment_preview"
t-att-data-id="attachment.id"
t-att-data-url="attachment.url"
t-on-click="_onPreviewAttachment"
t-attf-title="Preview #{attachment.name} in side panel"/>
</t>
</t>
</t>
</templates>
What changes can make it work ?