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

Hello All,

I have two types fields one is binary and another is Html type And i want to display both fields on template. My binary field image display on template form but html not display. So, Anyone suggest me how to format html as binary to display my image? Below is my code for template where Binary image display but html field image not.

Thanks in advance

message = fields.Html('Message')
image = fields.Binary('Image')

# For Binary
<a class="thumbnail fancybox" rel="ligthbox" t-att-href="'data:image/png;base64,'+widget.image">
    <img class="align-self-center rounded-circle mr-3" alt=""
    t-att-src="'data:image/png;base64,'+widget.image"/>
</a>
# For Html
<a class="thumbnail fancybox" rel="ligthbox" t-att-href="widget.message">
    <img class="align-self-center rounded-circle mr-3" alt=""
    t-att-src="widget.message"/>
</a>
อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hello All,

i got solution for above problem. my problem solved with following module https://www.odoo.com/apps/modules/11.0/html_image_url_extractor/

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ย. 19
5133
2
ก.พ. 24
3283
1
ส.ค. 23
4881
ir.values in odoo 11 แก้ไขแล้ว
6
เม.ย. 23
17132
2
ธ.ค. 22
6348