Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2435 Представления

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.

Аватар
Отменить
Лучший ответ

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>


Аватар
Отменить