Odoo consultants for regulated manufacturers · code you keep

Development · Odoo guide

How do I build a custom report in Odoo?

Odoo reports use QWeb templates in report XML, bound to models like sale.order or stock.picking, rendered to PDF via wkhtmltopdf or report engines. Create ir.actions.report, define paperformat, build QWeb with t-field and t-call layouts, add CSS, and expose print action on form views. For spreadsheets, use list export or XLSX reporting modules with SQL views.

By Chase Robbins, Operator & Founder at The ERP Firm · Last updated October 24, 2026

Steps

  1. Scaffold report XML with report_type qweb-pdf and model binding.
  2. Design QWeb template inheriting web.external_layout for headers and footers.
  3. Register report in __manifest__.py data files and security if new models.
  4. Add print button via ir.actions.report binding on form view.
  5. Test with sample records including multi-company and language translations.
  6. Tune paperformat margins for wkhtmltopdf; verify barcode fonts if needed.
  7. For aggregated reports, create SQL view model and pivot or XLSX export action.

Common mistakes

  • Using HTML tags unsupported by wkhtmltopdf version on server.
  • Missing t-lang on translated documents.
  • Huge images in template slowing PDF generation.
  • Report on transient model without storing data.
  • Forgetting access rights on report-only models leaking data.

Odoo version notes

QWeb PDF reports work in Community and Enterprise 16–18; wkhtmltopdf version matters on Odoo.sh. Odoo 17+ improves report editor in some editions. Spreadsheet dashboard reports are Enterprise BI direction—custom SQL still common. Test print after each upgrade for layout shifts.

When to bring in help

If the fix touches custom modules, regulated traceability, or production outages, a focused rescue sprint beats months of trial and error. See our Odoo service.

FAQ

Follow-up questions

Can reports email automatically?
Use server actions sending mail.template with report attachment on state change.
How to add barcodes?
Use report barcode widgets or embedded images generated from stock.lot names.
XLSX vs PDF?
XLSX better for finance extracts; PDF for customer-facing documents and signatures.

Book a scoping call for your Odoo environment.

Bring your version, user count, and the workflow that is blocked today.

Book a scoping call