Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
13251 มุมมอง

I'm trying to rescale images inside a report because they are big, but is not working. I'm trying with t-field-options='{"widget": "image", "size":[512,512]}' but it does nothing. I've tried with css/styles too but it isn't changing the size. What else could I try?

Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

datas is binary field,

<span t-field="o.datas" t-field-options='{"widget": "image", "style":"width: 150px;height: 150px"}'/>

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Nacho,

This how company logo is set on report header

<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>

Best regards.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

A lot of thanks Bejaoui Souheil, the problem was the widget option, with your code I can give to the image the size I want

อวตาร
ละทิ้ง

Happy to Help :)

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ธ.ค. 21
4971
1
มิ.ย. 20
4695
1
ธ.ค. 19
7470
5
มิ.ย. 17
9125
5
พ.ย. 16
6994