コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3959 ビュー

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

アバター
破棄
著作者 最善の回答

Finaly that worked form me:

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

アバター
破棄
最善の回答

Hi,

Please check this,

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

Thanks
Aswini iWesabe 
アバター
破棄
関連投稿 返信 ビュー 活動
0
10月 16
3669
1
5月 15
13921
1
7月 25
1499
1
7月 25
1796
1
5月 25
1480