콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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 :)

관련 게시물 답글 화면 활동
1
12월 21
5202
1
6월 20
4915
1
12월 19
7747
5
6월 17
9355
5
11월 16
7202