Creating business reports
Reports are an important part for a business application. Since version 8, the reference report engine for Odoo is QWeb. Reports are views rendered in HTML and then exported to PDF. This means that most of what we have learned with kanban views will also be useful to design reports.
We will add a report to our module. First, we should add the file with its definition to the todo_kanban/__openerp__.py
descriptor file, as shown in the following:
'data': ['todo_view.xml', 'todo_report.xml']
The todo_report.xml
file can start by declaring the new report as follows:
<?xml version="1.0"?> <openerp> <data> <report id="report_todo_task_action" string="To-do Tasks" model="todo.task" report_type="qweb-pdf" name="todo_kanban.report_todo_task_template" /> </data> </openerp>
The <report>
tag is a shortcut to write data on the ir.actions.report.xml
model, which is a particular...