Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
4090 Vues

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
Ignorer
Auteur Meilleure réponse

Finaly that worked form me:

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

Avatar
Ignorer
Meilleure réponse

Hi,

Please check this,

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

Thanks
Aswini iWesabe 
Avatar
Ignorer
Publications associées Réponses Vues Activité
0
oct. 16
3747
1
mai 15
14019
1
juil. 25
1704
1
juil. 25
1931
1
mai 25
1694