تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
8502 أدوات العرض

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
يونيو 21
6977
0
يناير 21
804
2
أبريل 20
10325
0
مايو 24
1872
2
مايو 24
3662