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

this my code

<img src="/my_module/static/img/img.png" width="100%" height="100%"/>

but the image not show


Could anyone help me, please?

아바타
취소
베스트 답변

Hello,

Try this,

Your image should be saved inside yourmodule/static/src/img/image name

<img src='/module name/static/src/img/image name with extention' style="max-height: 45px;"/>

In case if you have stored your image in a binary field then use this,

<img t-attf-src="data:image/*;base64,{{o.field_name}}" style="max-height: 80px;max-width: 145px;padding:2px;" align="center"/>

Check this too https://www.odoo.com/forum/help-1/display-image-in-qweb-report-76746


Thanks

아바타
취소
베스트 답변

Try this,

<img t-attf-src="'/my_module/static/img/img.png'" width="100%" height="100%"/>

or

<img t-attf-src="data:image/jpg;base64,{{ model.some_logo }}" align="left" height="65" width="65" style='margin:0px;padding-top:0px;' />
아바타
취소
관련 게시물 답글 화면 활동
2
10월 22
5637
2
3월 21
8891
0
12월 20
3674
0
5월 20
2806
0
1월 20
2286