コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
8943 ビュー

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
7251
0
1月 21
804
2
4月 20
10998
0
5月 24
2326
2
5月 24
4306