Skip to Content
Menu
This question has been flagged
2 Replies
4132 Rodiniai

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

Portretas
Atmesti
Autorius Best Answer

Finaly that worked form me:

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

Portretas
Atmesti
Best Answer

Hi,

Please check this,

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

Thanks
Aswini iWesabe 
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
spal. 16
3778
1
geg. 15
14057
1
liep. 25
1773
1
liep. 25
2010
1
geg. 25
1848