Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
9123 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvn 21
7306
0
led 21
804
2
dub 20
11041
0
kvě 24
2379
2
kvě 24
4361