Declarative dashboard headers
An addon depending on web can declare one dashboard directly under a list root. It needs no custom client code:
<list string="Books"> <dashboard> <count name="available" string="Available books" domain="[('available', '=', True)]" color="success"/> <kpi name="pages_added" string="Pages added" field="pages" aggregate="sum" date_field="create_date"/> </dashboard> <field name="title"/> <field name="pages"/></list>Item names are unique within the owning view and contain letters, digits or underscores. Captions belong to the view record. A count has exactly one domain or filter; filter names a filter in the selected action’s companion search view. A named filter cannot change context. Count colors are optional semantic roles: info, success, warning or danger.
A KPI declares a stored integer/float field, an aggregate (sum, avg, min or max), and a stored date/datetime field. Monetary and relational measures are refused. Optional KPI domains further narrow the current search. Dashboard domain evaluation accepts literal criteria and uid; it does not execute calls or record expressions. Row fields remain independent from dashboard measures.
All reads use current caller access and record rules. An unreadable metric reference removes the complete strip. Unknown input is refused, including unknown attributes, malformed expressions, duplicate identities and unsupported versions. The server resolves the saved action and combined view again on each data request; clients cannot submit new executable metric definitions. A revision mismatch requires reloading the view.
The shared renderer and declaration are view-neutral; this delivery attaches the strip to lists. Kanban attachment is separate. See the Library example for an installed data-only addon declaration.
Runtime settings
Section titled “Runtime settings”The database-scoped keys are web.dashboard_max_items, web.dashboard_max_period_days and web.dashboard_periods. The period list is bounded UTF-8 JSON text, at most 4096 bytes, containing 1–16 choices. A rolling choice has id, label, kind: "rolling" and days; calendar choices use kind: "month" or "year" and omit days. IDs are unique and at most 64 bytes; labels are at most 256 bytes. The group validator refuses choices beyond the configured horizon. Zero never means unlimited.
Counts and totals are returned as decimal text so browser numeric precision does not change them. Missing aggregate values and unavailable comparisons remain explicit nulls. No new persistence model, background job or shared result cache is needed.