Dashboards

Reports and charts

MarketplaceContent and documentsVersion 0.1.0manifest

What it is for ​

Store dashboards and widgets as data (KPI, bar, line, pie and table definitions) for a client to render. The package never runs a query and does not check that the models it names exist.

What the package does and does not do ​

Dashboards and their widgets stored as data, for a UI to render. A dashboard has a title and an owner. A widget describes one tile with these fields: kind (kpi, bar, line, pie or table), model_name (the model to read, for example sale_order), measure_field (the field to aggregate; empty for count), aggregate (count or sum; sum needs a number or money measure_field), group_by (field to split by, for bar, line, pie and table; empty for a single kpi value), filter (a JSON object of field names to exact values, for example {"state":"paid"}; empty means all records) and position (order on the dashboard, lowest first). The package only stores the definition; it does not check that the model or fields exist and it computes nothing.

Models ​

dashboards_dashboard ​

A dashboard: a titled, ordered collection of widgets

Read group: dashboards.user. Write group: dashboards.manager.

FieldKindData classPersonal dataGroupAgents seeDescription
titletextnonenodashboards.userin clearDashboard title, for example Sales overview
ownertextinternalyesdashboards.usermaskedName of the person who owns the dashboard
descriptionlongtextnonenodashboards.userin clearWhat the dashboard shows and for whom
sharedboolnonenodashboards.userin clearWhether everyone with access to the Dashboards app sees it, or only the owner
positionnumbernonenodashboards.userin clearOrder among dashboards, lowest first

dashboards_widget ​

One tile on a dashboard, defined by what to read and how to aggregate it

Read group: dashboards.user. Write group: dashboards.manager.

FieldKindData classPersonal dataGroupAgents seeDescription
dashboard_idref → dashboards_dashboardnonenodashboards.userin clearThe dashboard the widget is on
titletextnonenodashboards.userin clearTile title, for example Paid orders
kindselect (kpi, bar, line, pie, table)nonenodashboards.userin clearHow the tile is drawn: kpi, bar, line, pie, table
model_nametextnonenodashboards.userin clearModel the tile reads, for example sale_order
measure_fieldtextnonenodashboards.userin clearField to aggregate: a number or money field of the model; empty when counting
aggregateselect (count, sum)nonenodashboards.userin clearHow records are combined: count or sum
group_bytextnonenodashboards.userin clearField to split the result by (a select, ref or date field); empty for one value
filterlongtextnonenodashboards.userin clearJSON object of field names to exact values that records must match, for example {"state":"paid"}; empty means all records
positionnumbernonenodashboards.userin clearOrder of the tile on the dashboard, lowest first

Workflows ​

This app has no workflow actions; records are created and edited directly.

Permission groups ​

Groups used by this app:

  • dashboards.manager
  • dashboards.user

Approval steps ​

No step in this app needs an approval, apart from deleting records.

What agents can and cannot do ​

An agent can read, search, create and update records of this app, and run the actions that need no approval, within the permission groups of its token.

It can only propose these steps, and a person must approve them: dashboards_dashboard.delete, dashboards_widget.delete.

Personal data is masked as placeholder tokens: dashboards_dashboard.owner.

Dependencies ​

None.

Install ​

Install it from the Customize app (Marketplace), or from the command line:

bash
obop modules install-from dashboards

Needs a database and administrator rights.

Build your own ​

The module guide shows how apps like this one are written