Odoo offers powerful reporting features across Sales, HR, Accounting, Inventory, and more. While Odoo comes with many predefined reports, businesses often need customized reports that fit their unique workflows.
In this guide, we’ll go step by step through how to build custom reports in Odoo from simple no-code methods to advanced QWeb PDF reports.
Why Custom Reports in Odoo?
Tailored Insights – Track KPIs specific to your business.
Better Decision-Making – Get precise data without distractions.
Flexibility – Choose PDF, Excel, Pivot, or BI dashboards.
Automation – Schedule reports instead of manual exports.
Options for Creating Custom Reports
Odoo Studio (No-Code Approach)
- Best for functional users.
- Allows customisation of existing reports or creating simple new ones.
- Accessible directly from the UI → Reporting → Create/Edit Reports.
2. Pivot Tables and Graph Views
- Available in all core apps (Sales, Inventory, Accounting).
- Drag-and-drop KPIs like Total Revenue, Customer, Product Category.
- Save as custom dashboards for future use.
3. Spreadsheet Reports (New in Odoo 17 Enterprise)
- Odoo Spreadsheets now support live data connections.
- Example: An HR manager can create a live spreadsheet showing employee attendance pulled directly from Odoo.
- Can be shared with teams without exporting to Excel.
4. QWeb Reports (Developer Method for PDF/Printable Reports)
This is the most powerful method for invoices, payslips, quotations, and custom PDF reports.
Step-by-Step: Creating a Custom QWeb Report
Step 1: Create a Custom Module
Step 2: Define the Report in report.xml
Eg:
<odoo> <record id="action_custom_sales_report" model="ir.actions.report"> <field name="name">Custom Sales Report</field> <field name="model">sale.order</field> <field name="report_type">qweb-pdf</field> <field name="report_name">custom_sales_report.report_sales_template</field> <field name="report_file">custom_sales_report.report_sales_template</field> <field name="print_report_name">'Sales Report - %s' % (object.name)</field> </record> </odoo> |
Step 3: Create the QWeb Template
<odoo> <template id="report_sales_template"> <t t-call="web.html_container"> <t t-foreach="docs" t-as="o"> <div class="page"> <h2 style="text-align:center;">Custom Sales Report</h2> <p><strong>Order:</strong> <t t-esc="o.name"/></p> <p><strong>Customer:</strong> <t t-esc="o.partner_id.name"/></p> <p><strong>Date:</strong> <t t-esc="o.date_order"/></p> <p><strong>Total:</strong> <t t-esc="o.amount_total"/></p> <h4>Order Lines:</h4> <table class="table table-sm o_main_table" style="width:100%;"> <thead> <tr> <th>Product</th> <th>Qty</th> <th>Unit Price</th> <th>Subtotal</th> </tr> </thead> <tbody> <t t-foreach="o.order_line" t-as="line"> <tr> <td><t t-esc="line.product_id.display_name"/></td> <td><t t-esc="line.product_uom_qty"/></td> <td><t t-esc="line.price_unit"/></td> <td><t t-esc="line.price_subtotal"/></td> </tr> </t> </tbody> </table> </div> </t> </t> </template> </odoo> |
Step 4: Add Python Logic
Step 5: Update Manifest File
Step 6: Install and Test
- Go to Apps → Update Apps List.
- Install your module.
- Open a Sales Order → Print → Select Custom Sales Report.
Best Practices for Reports
- Plan First: Define KPIs before building.
- Use Bootstrap Classes: Odoo reports support Bootstrap for cleaner designs.
- Optimise Queries: Don’t load unnecessary fields in Python.
- Test with Large Data: Ensure performance when handling many records.
- Reuse Existing Reports: Duplicate and modify instead of starting from scratch.
Odoo makes custom reporting easier and more powerful than ever. You can:
- Use Studio for no-code report building.
- Explore Pivot & Spreadsheet reports for interactive analysis.
- Build QWeb PDF reports for formal documents.
- Integrate with BI tools for advanced dashboards.
By mastering custom reports, you ensure your business always has the right insights at the right time—driving smarter decisions and greater efficiency