Skip to Content
Menú
This question has been flagged
1 Respondre
8725 Vistes

Hi every one,

I want to show my attachment(binary) field data on webpage as pdf file kindly guid.

Thank you so much in advance

Avatar
Descartar
Best Answer

Hi,

You can use the following code, adapt it as you need:

<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>

Best regards!

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de juny 21
7113
0
de gen. 21
804
2
d’abr. 20
10713
0
de maig 24
2146
2
de maig 24
4060