---
title: "Inventory"
description: "Stock and warehouses. Describe warehouses and locations, record stock levels and log stock moves."
canonical: "https://obop-platform.sliplane.app/apps/inventory/"
lang: "en"
---

# Inventory

## What it is for

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.

## What the package does and does not do

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

## Models

### `inventory_warehouse`

A building or site where stock is kept

Read group: `inventory.user`. Write group: `inventory.manager`.

| Field | Kind | Data class | Personal data | Group | Agents see | Description |
|---|---|---|---|---|---|---|
| `name` | text | `none` | no | `inventory.user` | in clear | Warehouse name |
| `code` | text | `none` | no | `inventory.user` | in clear | Short code printed on documents, for example WH1 |
| `address` | longtext | `none` | no | `inventory.user` | in clear | Postal address of the site |
| `active` | bool | `none` | no | `inventory.user` | in clear | Whether the warehouse is in use |

### `inventory_location`

A place inside a warehouse where stock can sit

Read group: `inventory.user`. Write group: `inventory.manager`.

| Field | Kind | Data class | Personal data | Group | Agents see | Description |
|---|---|---|---|---|---|---|
| `name` | text | `none` | no | `inventory.user` | in clear | Location name, for example Shelf A3 |
| `warehouse_id` | ref → inventory_warehouse | `none` | no | `inventory.user` | in clear | The warehouse the location belongs to |
| `kind` | select (internal, receiving, shipping, transit, scrap) | `none` | no | `inventory.user` | in clear | What the location is used for: internal, receiving, shipping, transit, scrap |
| `active` | bool | `none` | no | `inventory.user` | in clear | Whether the location is in use |

### `inventory_item`

The quantity of one product held at one location

Read group: `inventory.user`. Write group: `inventory.manager`.

| Field | Kind | Data class | Personal data | Group | Agents see | Description |
|---|---|---|---|---|---|---|
| `product_id` | ref → product | `none` | no | `inventory.user` | in clear | The product held |
| `location_id` | ref → inventory_location | `none` | no | `inventory.user` | in clear | Where it is held |
| `quantity` | number | `none` | no | `inventory.user` | in clear | Units on hand |
| `reorder_level` | number | `none` | no | `inventory.user` | in clear | Quantity at or below which the product should be replenished |
| `lot` | text | `none` | no | `inventory.user` | in clear | Lot or batch number, if tracked |

### `inventory_move`

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

Read group: `inventory.user`. Write group: `inventory.user`.

| Field | Kind | Data class | Personal data | Group | Agents see | Description |
|---|---|---|---|---|---|---|
| `reference` | text | `none` | no | `inventory.user` | in clear | Reference of the move, for example a delivery or receipt number |
| `product_id` | ref → product | `none` | no | `inventory.user` | in clear | The product moved |
| `from_location_id` | ref → inventory_location | `none` | no | `inventory.user` | in clear | Where it leaves; empty for a receipt from a supplier |
| `to_location_id` | ref → inventory_location | `none` | no | `inventory.user` | in clear | Where it arrives; empty for a delivery to a customer |
| `quantity` | number | `none` | no | `inventory.user` | in clear | Units moved |
| `scheduled_on` | date | `none` | no | `inventory.user` | in clear | Date the move is planned for (YYYY-MM-DD) |
| `state` | select (draft, done, cancelled) | `none` | no | `inventory.user` | in clear | Move status: draft, done, cancelled |

## Workflows

### `inventory_move`

| Action | Moves | Who may run it | Approval |
|---|---|---|---|
| `inventory_move.validate` | state: draft → done | `inventory.user` | yes |
| `inventory_move.cancel` | state: draft → cancelled | `inventory.user` | no |

## Permission groups

Groups used by this app:

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

## Approval steps

Steps an agent can only propose:

- `inventory_move.validate`

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

## Dependencies

- `product`

## Install

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

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

Needs a database and administrator rights.

## Build your own

[The module guide shows how apps like this one are written](/docs/reference/module-manifest/)
