Skip to Content
Menú
This question has been flagged
2 Respostes
3859 Vistes

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
Descartar
Autor Best Answer

Finaly that worked form me:

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

Avatar
Descartar
Best Answer

Hi,

Please check this,

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

Thanks
Aswini iWesabe 
Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
d’oct. 16
3577
1
de maig 15
13796
1
de maig 25
1556
1
de maig 25
1155
1
d’abr. 25
1959