İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2446 Görünümler

Hello,

We use odoo 12 community,

I want add all image a product in sales report.

I used in below code:

<td class="text-center" width="30%" height="5%">
      <img t-attf-src="data:image/*;base64,{{p.product_id.image_small }}" style="width:100;height:40"/>
 </td>

   

but this code just display image field: image_medium not the images in the images tab.
please help me, Thanks.

Avatar
Vazgeç
En İyi Yanıt

You should loop on the images field and then display the image.

<t foreach="p.image_ids" t-as="img">
<td class="text-center" width="30%" height="5%">
<img t-attf-src="data:image/*;base64,{{img.image}}" style="width:100;height:40"/>
</td>
</t>


Avatar
Vazgeç