Custom dashboards

The Dashboard module (dashboard) adds a second, fully configurable dashboard application. Unlike the standard dashboards, custom dashboards are built record by record: each dashboard (or board) is a grid of widgets — charts, KPIs, tables, and shortcuts — that read live data from the database.

Note

This documentation describes the Dashboard (dashboard) module. The standard, pre-configured dashboards described in Dashboards are provided by a different application, which also uses the name Dashboards.

Access rights

The module defines three access levels in the Dashboard category of a user’s access rights:

  • User: can open the dashboards they have been granted access to.

  • Manager: can create and configure dashboards and widgets, and manage the layout.

  • Technical (Python / SQL): can additionally create widgets whose data comes from Python code or an SQL query.

Danger

Python and SQL widgets run with full database access, bypassing access rights and record rules. Grant the Technical (Python / SQL) level only to users who are trusted with reading the entire database.

Create a dashboard

To create a dashboard, go to Dashboards ‣ Configuration ‣ Boards and click New. Fill in:

  • Dashboard Name: the name shown in the menu and at the top of the dashboard.

  • Menu Sequence: the position of the dashboard’s menu item.

  • Also show under: optionally, another app’s menu (e.g., Sales) where a menu item for this dashboard is created as well, in addition to the entry in the Dashboards app.

  • Auto Refresh: how often the dashboard reloads its data — Off, 15 seconds, 30 seconds, 1 minute, or 5 minutes.

  • Allowed Groups and Allowed Users: who may open the dashboard. If both are empty, every user with Dashboard / User rights sees it.

The System section shows the client action and the menu items Odoo created for the dashboard; these fields are read-only.

Click View Dashboard in the header to open the dashboard itself.

screenshot: productivity-custom-dashboards-board-form
menu
Dashboards ‣ Configuration ‣ Boards
shows
The dashboard form with the name, the Menu, Settings and Access groups filled in, and the Widgets tab listing four widgets with their type and data source.
highlight
The "Access" and "Settings" groups (red frame).
data
Dashboard "Sales overview" with widgets "Revenue" (KPI), "Monthly sales" (Chart), "Top customers" (Table), "New quotation" (Shortcut).
module
dashboard
notes
English UI, light theme, 1440px width.

Arrange the layout

On the dashboard itself, widgets are placed on a grid. Managers can drag a widget by its header to move it and drag its bottom-right corner to resize it. The layout is stored per dashboard, so all users see the same arrangement.

screenshot: productivity-custom-dashboards-layout
menu
Dashboards ‣ <dashboard name>
shows
A custom dashboard with a KPI row at the top, a bar chart and a pie chart side by side, a table below, and a widget being dragged to a new grid position.
data
Dashboard "Sales overview" with demo sales data.
module
dashboard
notes
English UI, light theme, 1440px width.

Widgets

Widgets are managed from the Widgets tab of a dashboard, or from Dashboards ‣ Configuration ‣ Widgets. Each widget has a Name, a Type, and — except for shortcuts — a Data Source.

Data source

  • ORM: the widget reads a model through the standard database layer, so the user’s access rights and record rules apply. Select the Model, the Category / Group By field and, for hierarchical charts, a Sub / Secondary Group By field. A Domain Filter, a Date Filter Field with a Date Range, a Limit, and the sorting (Sort By, Sort Order) further restrict the data. For records linked through a many2many or one2many field, M2M / O2M Aggregation decides whether a record is counted once for each related record or only once, and Include Empty Category adds a bucket for records with no value.

  • Python: the widget is filled by a short Python snippet that populates a result dictionary.

  • SQL: the widget is filled by a SELECT query. The first column provides the labels, the remaining columns the values. Statements that modify data are rejected.

Both Python and SQL are edited in the Custom Code tab and are only available to users with the Technical (Python / SQL) access level.

Measures

In the Measures list, add the fields to plot or aggregate. For each measure, select the Field, the Aggregation, an optional Label and Color, and — for dual-axis charts — the Y Axis to use.

Charts

Set the Chart Type to Bar, Line, Area, Pie, Radar, Funnel, Gauge, Scatter, Heatmap, Treemap, Sunburst, Dual Sunburst, Sankey, Stacked Bar (Hierarchical), or Bubble / Scatter.

Depending on the chart type, further options appear: Orientation and Stacking for bars, Smooth, Show Dots and Step for lines, Doughnut Style, Top N (0=all), Group Others and Label Format for pies, or Min and Max for gauges. Show Legend and Show Labels control the chart decorations, and Theme switches between the Default, Dark, and Vintage color themes.

Tip

Hierarchical chart types (treemap, sunburst, dual sunburst, sankey, hierarchical stacked bar, bubble) display two levels of data and therefore require a Sub / Secondary Group By field.

screenshot: productivity-custom-dashboards-chart-widget
menu
Dashboards ‣ Configuration ‣ Widgets
shows
A chart widget form with Type "Chart", Data Source "ORM", the Data Source group (model, category group-by), the Measures list with one measure, and the Bar Options group.
highlight
The "Data Source" and "Measures" groups (red frame).
data
Widget "Monthly sales" on model "Sales Order", grouped by order date, measure "Total" summed.
module
dashboard
notes
English UI, light theme, 1440px width.

KPIs

A KPI widget shows a single aggregated figure. Set an Icon, an optional Target value, and a Compare Period to display the variation against the previous period.

Tables

A table widget lists records of the selected model. Choose the fields to display in Columns; the Limit and sorting options of the data source decide how many rows are shown and in which order.

Shortcuts

A shortcut widget is a button that opens a view or a URL. Select an Action or enter a Target URL, and choose an Icon or upload an Icon Image. To display a counter on the button, select a Badge Model and, optionally, a Badge Domain that restricts the records counted.

Appearance and access

Every widget has a Primary Color and a Secondary Color, and can be restricted to specific Allowed Groups or Allowed Users. A widget that a user may not see is simply left out of their dashboard.

Sample dashboards

To get started quickly, go to Dashboards ‣ Configuration ‣ Settings. Each card creates a ready-made dashboard filled with widgets built on real data from the corresponding app: Sales Dashboard, Accounting Dashboard, Inventory Dashboard, CRM Dashboard, and Purchase Dashboard. Each sample can only be created once, after which it can be edited like any other dashboard.

screenshot: productivity-custom-dashboards-samples
menu
Dashboards ‣ Configuration ‣ Settings
shows
The Settings page with the "Sample Dashboards" cards for Sales, Accounting, Inventory, CRM and Purchase, each with its create button.
module
dashboard
notes
English UI, light theme, 1440px width.