---
title: "Timesheets"
description: "Tiempo y facturación. Cada aplicación es un módulo sobre un único modelo de datos."
canonical: "https://obop.dev/es/apps/timesheets/"
lang: "es"
---

# Timesheets

## Para qué sirve

Record time spent on project tasks in minutes, mark it billable and run it through an approval step. Needs the Projects package.

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

Time spent on project tasks, entered in minutes, with a billable flag and an approval step. Needs the Projects package.

## Modelos

### `timesheets_entry`

Time one person spent on one task on one day

Grupo de lectura: `timesheets.user`. Grupo de escritura: `timesheets.user`.

| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
| `task_id` | ref → projects_task | `none` | no | `timesheets.user` | en claro | The task worked on |
| `worker` | text | `internal` | sí | `timesheets.user` | enmascarado | Name of the person who did the work |
| `worked_on` | date | `none` | no | `timesheets.user` | en claro | Day the work was done (YYYY-MM-DD) |
| `minutes` | number | `none` | no | `timesheets.user` | en claro | Time spent, in minutes |
| `billable` | bool | `none` | no | `timesheets.user` | en claro | Whether the time can be charged to the customer |
| `description` | text | `none` | no | `timesheets.user` | en claro | What was done |
| `cost_rate` | money | `financial` | sí | `timesheets.cost_viewer` | retenido | Internal hourly cost of the worker at the time of entry (minor currency units, e.g. cents) |
| `state` | select (draft, submitted, approved) | `none` | no | `timesheets.user` | en claro | Entry status: draft, submitted, approved |

## Flujos de trabajo

### `timesheets_entry`

| Acción | Mueve | Quién puede ejecutarla | Aprobación |
|---|---|---|---|
| `timesheets_entry.submit` | state: draft → submitted | `timesheets.user` | no |
| `timesheets_entry.approve` | state: submitted → approved | `timesheets.manager` | no |
| `timesheets_entry.reject` | state: submitted → draft | `timesheets.manager` | no |

## Grupos de permisos

Grupos que usa esta aplicación:

- `timesheets.cost_viewer`
- `timesheets.manager`
- `timesheets.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: `timesheets_entry.delete`.

Los datos personales se enmascaran como tokens marcadores: `timesheets_entry.worker`.

Estos campos se retienen por completo y los agentes no los ven: `timesheets_entry.cost_rate`.

## Dependencias

- `projects`

## Instalación

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

```bash
obop modules install-from timesheets
```

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/)
