Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8487 มุมมอง

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!

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 21
6965
0
ม.ค. 21
804
2
เม.ย. 20
10320
0
พ.ค. 24
1868
2
พ.ค. 24
3652