İçereği Atla
Menü
Bu soru işaretlendi
4 Cevaplar
13084 Görünümler

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

Avatar
Vazgeç
En İyi Yanıt

Hi,

datas is binary field,

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

Avatar
Vazgeç
En İyi Yanıt

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.

Avatar
Vazgeç
Üretici En İyi Yanıt

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

Avatar
Vazgeç

Happy to Help :)

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Ara 21
4916
1
Haz 20
4638
1
Ara 19
7387
5
Haz 17
9035
5
Kas 16
6887