Create and maintain report templates: name, data source, access, window action, analytics, exports, drills, and email.
Overview
Managers create report templates on model advance.report.template. A template is the single place where you define what data (model + domain), how users see it (view modes, pivot, graph, kanban), what leaves the server (export columns, max rows, PDF/Excel/CSV), where users can go next (drills), and who may use it (company, groups, users).
The form is organized into logical groups: Source, Access, Window action, Pivot, Graph & Kanban, Drills, Export columns, Server export, Email report, and Description.
How it works
On save, the module validates the domain and context, syncs pivot/graph/kanban lines to technical fields, and (when export columns exist) generates a dedicated list view (ir.ui.view) used when opening the report. Changing Model clears pivot, graph, kanban, and measure lines-you must reconfigure analytics for the new model.
Templates must use a model allowed by Studio configuration when a whitelist is set (see Studio Settings).
Step-by-step: create a new template
- As a Manager, go to Report templates and click New (or use Quick start presets to materialize a starter).
- Enter a clear Report Name (business wording, e.g. “Open quotations – my team”).
- Select Model (e.g. Sales Order, Contact, Task). The technical name appears read-only below.
- Optional: set Company, Owner, Allowed groups, Allowed users (see access chapter).
- Under Window action, set Domain, View modes tags, and optional Context (JSON).
- Configure Pivot row/column lines if pivot is in view modes.
- Configure Graph & Kanban (chart type, measure, group-by lines) if needed.
- Add Export columns and Max export rows.
- Add Drills if users should jump to related records.
- Optional: configure Email report and test with Send test email.
- Save, click Open report, verify record count and views; adjust domain if needed.
Form fields reference
| Field | Section | Purpose |
|---|---|---|
Report Name |
Title |
Displayed in menus and lists; translatable. |
Active |
Source |
Uncheck to archive; hidden by default search filter. |
Model |
Source |
Required data source; non-transient models only. |
Model technical name |
Source |
Read-only (e.g. |
Company |
Access |
Empty = shared across allowed companies. |
Owner |
Access |
Primary author; filter “My templates”. |
Allowed groups / users |
Access |
Optional visibility restriction (OR logic). |
Domain |
Window action |
Record filter (visual editor). |
View modes |
Window action |
Tags: list, form, pivot, graph, kanban, calendar. |
Context (JSON) |
Window action |
Extra action context (valid JSON object). |
Description |
Footer |
Internal documentation for designers. |
Field explanations
Each block matches one row in the table above, in the same order.
Report Name
Required, translatable title shown in the Report templates list and in menus. Use clear business wording (e.g. “Open quotations – my team”) so users pick the right report without opening each row.
Active
When enabled, the template appears under the default “Active” search filter on Report templates. Uncheck to archive: the definition stays in the database but is hidden from the default list until you filter Archived.
Model
Required Many2one to ir.model (non-transient models only). Defines which Odoo table the report reads. Changing the model clears pivot, graph, kanban lines and graph measure-reconfigure analytics after a model change.
Model technical name
Read-only related field (e.g. sale.order). Used internally for the domain widget, validation, and JSON export; confirms you picked the intended technical model.
Company
Optional Many2one to res.company. When set, the template is associated with that company in multi-company setups and email/export can use that company context. Empty means “not tied to a single company” (still subject to user company access).
Owner
Optional Many2one to res.users (primary author). Does not restrict who sees the template by itself; helps the My templates search filter and ownership audits.
Allowed groups / users
Two optional many2many fields: Allowed groups (res.groups) and Allowed users (res.users). If both are empty, any Advance Report user may see the template row. If either is set, the user must match at least one group or be listed as an allowed user (OR logic).
Domain
Filter on the template’s source model (visual domain editor). Evaluated with safe_eval when the report runs; applies to Open report, all exports, and email attachments. Must validate on save.
View modes
Many2many tags synced to the technical comma-separated view mode string. Choose which window views appear (list, form, pivot, graph, kanban, calendar where allowed). Order affects which view opens first when possible.
Context (JSON)
Text field holding a JSON object merged into the window action context (e.g. {"group_by": "country_id"}). Must parse as valid JSON on save; use for keys Odoo actions and views understand.
Description
Long translatable text for designers and support. Shown on the template form; the template list search can match name or description-good for internal notes, data definitions, and change history.
Tips
- Tip: Duplicate a[Studio demo]template (export JSON → import with new name) instead of building from zero.
- Tip: UseQuick start presetsfor model-appropriate domains and view modes in one click.
- Tip: After every major change, useOpen reportand check the status bar record count.
Common mistakes
- Common mistake: Changing model after adding pivot rows and export columns-you must rebuild those sections.
- Common mistake: Selecting a model blocked by Studio whitelist-save will fail with validation error.
- Common mistake: Leaving allowed groups/users set without including your own group – you may lose visibility to your own template.