Hello everyone,
I have an image field
project_image = fields.Binary(string="Builder Logo", attachment=True, store=True)
I need to set this image field as a background image in qweb report. Can anyone please help me with this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello everyone,
I have an image field
project_image = fields.Binary(string="Builder Logo", attachment=True, store=True)
I need to set this image field as a background image in qweb report. Can anyone please help me with this?
Hi,
To add an image from the backend field as the background image for the Qweb is as follows:-
t-att-style="'background-image:url(\'/web/image/model_name/' + str(object.id) + '/image_field/\')'"
add this attribute to the main div element in the qweb report.
For example:-
<div class="page" t-att-style="'background-image:url(\'/web/image/sale.order/' + str(doc.id) + '/project_image/\')'">
Regards
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
0
wrz 24
|
1331 | ||
|
1
maj 24
|
3024 | ||
|
1
kwi 24
|
26584 | ||
|
2
gru 23
|
59445 | ||
|
1
gru 22
|
2076 |
did you find any solution please ?
No, not right now.