Skip to Content
Menu
This question has been flagged
2 Replies
4048 Zobrazenia

Hi, I have a binary field (widget: image) but neither oth the two method work:


<img t-if="p.plato_ids.icono" t-att-src="'data:image/png;base64,%s' % p.plato_ids.icono"/>

(appears empty square)

  

<span t-field="p.plato_ids.icono" t-field-options='{"widget": "image"}'/>

(appears:  iVBORw0KGgoAAAANSUhEUgAAAH gAAAB3C.............)


anyone knows any other method? Thank you

Avatar
Zrušiť
Autor Best Answer

Finaly that worked form me:

<img t-attf-src="data:image/*;base64,{{p.plato_ids.icono}}"/>

Avatar
Zrušiť
Best Answer

Hi,

Please check this,

<img t-att-src="'data:image/png;base64,%s' % to_text(object.name)"/>

Thanks
Aswini iWesabe 
Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
okt 16
3734
1
máj 15
14009
1
júl 25
1667
1
júl 25
1907
1
máj 25
1654