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?
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;' />Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
2
okt. 22
|
7357 | |||
|
2
mar. 21
|
11168 | |||
|
0
dec. 20
|
5500 | |||
|
0
maj 20
|
4487 | |||
|
0
jan. 20
|
4043 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
I solved it check this:
https://stackoverflow.com/questions/66379366/how-to-insert-image-in-odoo-12-docker-qweb-report