تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
4104 أدوات العرض

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
أكتوبر 16
3750
1
مايو 15
14024
1
يوليو 25
1722
1
يوليو 25
1948
1
مايو 25
1723