跳至内容
菜单
此问题已终结
1 回复
8508 查看

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

形象
丢弃
最佳答案

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!

形象
丢弃
相关帖文 回复 查看 活动
1
6月 21
6981
0
1月 21
804
2
4月 20
10325
0
5月 24
1875
2
5月 24
3663