Search Here

How to Create QWEB Reports in OpenERP

In this article you will learn how to create a report in odoo from scratch using Qweb reporting engine. You will also learn how to use and create variables, loops, conditions in QWEB reporting template.


How to Create QWEB Reports in OpenERP


How to Create QWEB Report in Odoo | OpenERP


In Odoo we can create reports using HTML/QWEB. QWEB is a templating engine which is used to generate HTML pages or templates frames. In this example we are going to pass or render report data to our QWEB XML template.


create_qweb_report_openerp_odoo.xml


create_qweb_report_openerp_odoo.py


Read More: How to hide export option from more menu in odoo

How to Check Condition in QWEB Templates


<t t-if="condition">
    <p>Test</p>
</t>

How to Display Data Output in QWEB Template

<p><t t-esc="value"/></p>

How to Print Values in Loop in QWEB Template

<t t-foreach="[1, 2, 3]" t-as="i">
    <p><t t-esc="i"/></p>
</t>

How to Create Variables in QWEB Template

<t t-set="existing_variable" t-value="False"/>

Post a Comment

2 Comments