Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
1648 Näkymät

Hello

I need to display a static image that links a field called "img_bc", this type of field has to be filled in by users, and I need to display an image with a small tail on the report Qweb printing

pls i need code which indicate on xml

THANKS

Avatar
Hylkää
Paras vastaus

Hi,

You can either use img tag in report to add the image to report pdf.

<img src='/module_name/static/src/img/name of image file' style="your custom style"/>

Or 

You can span the field containing the image in the report pdf.

<span t-field="line.image" t-options='{"widget": "image"}'/>

Or 

Add the image source dynamically.

<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" class="float-left" alt="Logo"/>


View similar forum post before

https://www.odoo.com/forum/help-1/question/display-image-in-qweb-report-76746" target="_blank">https://www.odoo.com/forum/help-1/question/display-image-in-qweb-report-76746


Hope it helps

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
3
toukok. 22
2130
2
jouluk. 24
8791
0
marrask. 23
3253
2
huhtik. 23
8357
1
lokak. 22
6035