How to create Qweb reports in odoo 14

Qweb is a template engine or reporting engine which can be used to create reports. Odoo uses Qweb for generating reports. Qweb provides several tools for creating a report. By using Qweb, we can manipulate the data very easily.

This blog will provide insight on how we can create a custom PDF Report in Odoo 14?


How Qweb Reports Work in Odoo?

1: Under report add new file named “report.xml”

In  “report.xml” add :
syntax as follws:

<report id=”<model_report_id>”
string=”name ”
name=”<module name.body template id>”
file=”<module name.body template id>”/>
In practical case:
<report id=”<estimate_order_id>”
string=”Estimate Contract ”

Defining  Report Templates:

Templates are designed in an HTML format. The structure will be written inside of <template> tags. We can use other templates inside our template using t-call property.

2: You can create an xml file inside the report directory


Leave a Reply

Your email address will not be published.