Skip to Content
Menu
This question has been flagged
1 Reply
3009 Views

Hello, 

I have a button added on gantt view( v13) and i created an attachment from a generated pdf, but i don't know to download this attachment directly when the button is clicked?   

Avatar
Discard
Best Answer
Core Module website_mail_channel
views website_mail_channel_templates.xml file code to download file.

<div class="o_mg_link_content">
<div class="col-lg-2 col-md-3 text-center" t-foreach='message.attachment_ids' t-as='attachment'>
<a t-attf-href="/web/content/#{attachment.id}?download=true" target="_blank">
<div class='oe_attachment_embedded o_image' t-att-title="attachment.name" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/100x80"/>
<div class='oe_attachment_name'><t t-raw='attachment.name' /></div>
</a>
</div>
</div>
Avatar
Discard