---
title: "Inventory"
description: "Existencias y almacenes. Cada aplicación es un módulo sobre un único modelo de datos."
canonical: "https://obop-platform.sliplane.app/es/apps/inventory/"
lang: "es"
---

# Inventory

## Para qué sirve

Describe warehouses and locations, record stock levels and log stock moves. Quantities are entered by people, so it works as a ledger of what was counted and moved rather than an automatic stock engine.

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

Warehouses, stock locations, stock levels and stock moves. Quantities are entered and validated by people; they are not updated automatically by moves.

## Modelos

### `inventory_warehouse`

A building or site where stock is kept

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

| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
| `name` | text | `none` | no | `inventory.user` | en claro | Warehouse name |
| `code` | text | `none` | no | `inventory.user` | en claro | Short code printed on documents, for example WH1 |
| `address` | longtext | `none` | no | `inventory.user` | en claro | Postal address of the site |
| `active` | bool | `none` | no | `inventory.user` | en claro | Whether the warehouse is in use |

### `inventory_location`

A place inside a warehouse where stock can sit

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

| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
| `name` | text | `none` | no | `inventory.user` | en claro | Location name, for example Shelf A3 |
| `warehouse_id` | ref → inventory_warehouse | `none` | no | `inventory.user` | en claro | The warehouse the location belongs to |
| `kind` | select (internal, receiving, shipping, transit, scrap) | `none` | no | `inventory.user` | en claro | What the location is used for: internal, receiving, shipping, transit, scrap |
| `active` | bool | `none` | no | `inventory.user` | en claro | Whether the location is in use |

### `inventory_item`

The quantity of one product held at one location

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

| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
| `product_id` | ref → product | `none` | no | `inventory.user` | en claro | The product held |
| `location_id` | ref → inventory_location | `none` | no | `inventory.user` | en claro | Where it is held |
| `quantity` | number | `none` | no | `inventory.user` | en claro | Units on hand |
| `reorder_level` | number | `none` | no | `inventory.user` | en claro | Quantity at or below which the product should be replenished |
| `lot` | text | `none` | no | `inventory.user` | en claro | Lot or batch number, if tracked |

### `inventory_move`

A movement of a product between locations, or into or out of the business

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

| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
| `reference` | text | `none` | no | `inventory.user` | en claro | Reference of the move, for example a delivery or receipt number |
| `product_id` | ref → product | `none` | no | `inventory.user` | en claro | The product moved |
| `from_location_id` | ref → inventory_location | `none` | no | `inventory.user` | en claro | Where it leaves; empty for a receipt from a supplier |
| `to_location_id` | ref → inventory_location | `none` | no | `inventory.user` | en claro | Where it arrives; empty for a delivery to a customer |
| `quantity` | number | `none` | no | `inventory.user` | en claro | Units moved |
| `scheduled_on` | date | `none` | no | `inventory.user` | en claro | Date the move is planned for (YYYY-MM-DD) |
| `state` | select (draft, done, cancelled) | `none` | no | `inventory.user` | en claro | Move status: draft, done, cancelled |

## Flujos de trabajo

### `inventory_move`

| Acción | Mueve | Quién puede ejecutarla | Aprobación |
|---|---|---|---|
| `inventory_move.validate` | state: draft → done | `inventory.user` | sí |
| `inventory_move.cancel` | state: draft → cancelled | `inventory.user` | no |

## Grupos de permisos

Grupos que usa esta aplicación:

- `inventory.manager`
- `inventory.user`

## Pasos con aprobación

Pasos que un agente solo puede proponer:

- `inventory_move.validate`

## 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: `inventory_move.validate`, `inventory_warehouse.delete`, `inventory_location.delete`, `inventory_item.delete`, `inventory_move.delete`.

## Dependencias

- `product`

## Instalación

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

```bash
obop modules install-from inventory
```

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