O'Reilly logo

Odoo Development Essentials by Daniel Reis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required