Skip to Content
Menu
This question has been flagged
1 Reply
1991 Views

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
Discard
Best Answer

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
Discard