In QWEB Report, we can add watermark text or images in the background.
we have to take one <div> (HTML tag), <p> or <img> tag with many CSS attributes.
Example: I want to add a sale order company logo in sale report as watermark text to the report in orange colour.
<div> in sale-->view-->report_saleorder.xml-->in <div class="page">
In report_saleorder.xml File
<img t-att-src="'data:image/png;base64,%s' % doc.company_id.logo"/>
Company image of sale order will get print in the report as a watermark. The image will be render using
- You can add CSS to elements in QWeb reports so you can add images in it.
- You can do anything you’d like with CSS so just host an image somewhere and add an element to your report which you style as you’d like.
Other Example: I want to add order number in the sale report as watermark text to the report in orange color.
<div class="watermark" style="position:absolute;opacity:0.25;font-size:3em;width:100%;text-align:center;z-index:1000;">
For any further queries feel free to Contact Us we would be glad to help you.