---
title: "Manufacturing"
description: "Bills of materials. Define what a product is made of and plan manufacturing orders through draft, confirmed, in progress and done."
canonical: "https://obop.dev/apps/manufacturing/"
lang: "en"
---

# Manufacturing

## What it is for

Define what a product is made of and plan manufacturing orders through draft, confirmed, in progress and done. Component stock is not consumed automatically.

## What the package does and does not do

Bills of materials and manufacturing orders with a draft, confirmed, in progress and done flow. Component stock is not consumed automatically.

## Models

### `manufacturing_bom`

A recipe: the components needed to make a product

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

| Field | Kind | Data class | Personal data | Group | Agents see | Description |
|---|---|---|---|---|---|---|
| `product_id` | ref → product | `none` | no | `manufacturing.user` | in clear | The finished product the recipe makes |
| `name` | text | `none` | no | `manufacturing.user` | in clear | Name of the recipe, for example Standard assembly |
| `quantity` | number | `none` | no | `manufacturing.user` | in clear | Units of the finished product one run produces |
| `instructions` | longtext | `none` | no | `manufacturing.user` | in clear | Assembly notes for the shop floor |
| `active` | bool | `none` | no | `manufacturing.user` | in clear | Whether the recipe can be used for new orders |

### `manufacturing_bom_line`

One component of a bill of materials

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

| Field | Kind | Data class | Personal data | Group | Agents see | Description |
|---|---|---|---|---|---|---|
| `bom_id` | ref → manufacturing_bom | `none` | no | `manufacturing.user` | in clear | The recipe the component belongs to |
| `component_id` | ref → product | `none` | no | `manufacturing.user` | in clear | The product consumed |
| `quantity` | number | `none` | no | `manufacturing.user` | in clear | Units of the component used per run |

### `manufacturing_order`

An instruction to produce a quantity of a product

Read group: `manufacturing.user`. Write group: `manufacturing.user`.

| Field | Kind | Data class | Personal data | Group | Agents see | Description |
|---|---|---|---|---|---|---|
| `reference` | text | `none` | no | `manufacturing.user` | in clear | Order number, for example MO-0042 |
| `bom_id` | ref → manufacturing_bom | `none` | no | `manufacturing.user` | in clear | The recipe to follow |
| `quantity` | number | `none` | no | `manufacturing.user` | in clear | Units of the finished product to make |
| `planned_on` | date | `none` | no | `manufacturing.user` | in clear | Date production should start (YYYY-MM-DD) |
| `deadline` | date | `none` | no | `manufacturing.user` | in clear | Date the goods are needed (YYYY-MM-DD) |
| `responsible` | text | `internal` | yes | `manufacturing.user` | masked | Name of the person in charge of the run |
| `state` | select (draft, confirmed, in_progress, done, cancelled) | `none` | no | `manufacturing.user` | in clear | Order status: draft, confirmed, in_progress, done, cancelled |

## Workflows

### `manufacturing_order`

| Action | Moves | Who may run it | Approval |
|---|---|---|---|
| `manufacturing_order.confirm` | state: draft → confirmed | `manufacturing.manager` | no |
| `manufacturing_order.start` | state: confirmed → in_progress | `manufacturing.user` | no |
| `manufacturing_order.finish` | state: in_progress → done | `manufacturing.user` | no |
| `manufacturing_order.cancel` | state: draft → cancelled | `manufacturing.user` | no |

## Permission groups

Groups used by this app:

- `manufacturing.manager`
- `manufacturing.user`

## Approval steps

No step in this app needs an approval, apart from deleting records.

## 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: `manufacturing_bom.delete`, `manufacturing_bom_line.delete`, `manufacturing_order.delete`.

Personal data is masked as placeholder tokens: `manufacturing_order.responsible`.

## Dependencies

- `product`

## Install

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

```bash
obop modules install-from manufacturing
```

Needs a database and administrator rights.

## Build your own

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