---
title: "Dashboards"
description: "Informes y gráficos. Cada aplicación es un módulo sobre un único modelo de datos."
canonical: "https://obop.dev/es/apps/dashboards/"
lang: "es"
---

# Dashboards

## Para qué sirve

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.

## Qué hace y qué no hace el paquete

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.

## Modelos

### `dashboards_dashboard`

A dashboard: a titled, ordered collection of widgets

Grupo de lectura: `dashboards.user`. Grupo de escritura: `dashboards.manager`.

| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
| `title` | text | `none` | no | `dashboards.user` | en claro | Dashboard title, for example Sales overview |
| `owner` | text | `internal` | sí | `dashboards.user` | enmascarado | Name of the person who owns the dashboard |
| `description` | longtext | `none` | no | `dashboards.user` | en claro | What the dashboard shows and for whom |
| `shared` | bool | `none` | no | `dashboards.user` | en claro | Whether everyone with access to the Dashboards app sees it, or only the owner |
| `position` | number | `none` | no | `dashboards.user` | en claro | Order among dashboards, lowest first |

### `dashboards_widget`

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

Grupo de lectura: `dashboards.user`. Grupo de escritura: `dashboards.manager`.

| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
| `dashboard_id` | ref → dashboards_dashboard | `none` | no | `dashboards.user` | en claro | The dashboard the widget is on |
| `title` | text | `none` | no | `dashboards.user` | en claro | Tile title, for example Paid orders |
| `kind` | select (kpi, bar, line, pie, table) | `none` | no | `dashboards.user` | en claro | How the tile is drawn: kpi, bar, line, pie, table |
| `model_name` | text | `none` | no | `dashboards.user` | en claro | Model the tile reads, for example sale_order |
| `measure_field` | text | `none` | no | `dashboards.user` | en claro | Field to aggregate: a number or money field of the model; empty when counting |
| `aggregate` | select (count, sum) | `none` | no | `dashboards.user` | en claro | How records are combined: count or sum |
| `group_by` | text | `none` | no | `dashboards.user` | en claro | Field to split the result by (a select, ref or date field); empty for one value |
| `filter` | longtext | `none` | no | `dashboards.user` | en claro | JSON object of field names to exact values that records must match, for example {"state":"paid"}; empty means all records |
| `position` | number | `none` | no | `dashboards.user` | en claro | Order of the tile on the dashboard, lowest first |

## Flujos de trabajo

Esta aplicación no tiene acciones de flujo de trabajo; los registros se crean y se editan directamente.

## Grupos de permisos

Grupos que usa esta aplicación:

- `dashboards.manager`
- `dashboards.user`

## Pasos con aprobación

Ningún paso de esta aplicación requiere aprobación, salvo eliminar registros.

## Qué pueden y qué no pueden hacer los agentes

Un agente puede leer, buscar, crear y actualizar registros de esta aplicación, y ejecutar las acciones que no requieren aprobación, dentro de los grupos de permisos de su token.

Solo puede proponer estos pasos, y una persona debe aprobarlos: `dashboards_dashboard.delete`, `dashboards_widget.delete`.

Los datos personales se enmascaran como tokens marcadores: `dashboards_dashboard.owner`.

## Dependencias

Ninguna.

## Instalación

Instálala desde la aplicación Customize (Marketplace) o desde la línea de comandos:

```bash
obop modules install-from dashboards
```

Requiere una base de datos y derechos de administrador.

## Crea la tuya

[La guía de módulos explica cómo se escriben aplicaciones como esta](/es/docs/reference/module-manifest/)
