Creating business reports
It would be helpful for the Library app to print out a report containing the book catalog. This report should list the book titles, along with details such as publisher, publishing date, and authors.
We will implement this throughout this chapter, and in the process showcase the several techniques involved in implementing Odoo reports. The report will be added to the existing library_app
module.
The convention is to have report files in a /reports
subdirectory, so a reports/library_book_report.xml
data file will be added. As usual, when adding data files, remember to also declare them in the data
key of the __manifest__.py
file.
To be able to run a report, the first thing we must add is the report action.
Adding the report action
The report action triggers the execution of a report, similarly to how window actions trigger web client view presentations. A report action is a record in the ir.actions.report
XML model, and it can be inspected by...