---
title: "Manufacturing"
description: "Stycklistor. Varje app är en modul i en gemensam datamodell."
canonical: "https://obop-platform.sliplane.app/sv/apps/manufacturing/"
lang: "sv"
---

# Manufacturing

## Vad den är till för

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

## Vad paketet gör och inte gör

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

## Modeller

### `manufacturing_bom`

A recipe: the components needed to make a product

Läsgrupp: `manufacturing.user`. Skrivgrupp: `manufacturing.manager`.

| Fält | Typ | Dataklass | Personuppgift | Grupp | Agenter ser | Beskrivning |
|---|---|---|---|---|---|---|
| `product_id` | ref → product | `none` | nej | `manufacturing.user` | i klartext | The finished product the recipe makes |
| `name` | text | `none` | nej | `manufacturing.user` | i klartext | Name of the recipe, for example Standard assembly |
| `quantity` | number | `none` | nej | `manufacturing.user` | i klartext | Units of the finished product one run produces |
| `instructions` | longtext | `none` | nej | `manufacturing.user` | i klartext | Assembly notes for the shop floor |
| `active` | bool | `none` | nej | `manufacturing.user` | i klartext | Whether the recipe can be used for new orders |

### `manufacturing_bom_line`

One component of a bill of materials

Läsgrupp: `manufacturing.user`. Skrivgrupp: `manufacturing.manager`.

| Fält | Typ | Dataklass | Personuppgift | Grupp | Agenter ser | Beskrivning |
|---|---|---|---|---|---|---|
| `bom_id` | ref → manufacturing_bom | `none` | nej | `manufacturing.user` | i klartext | The recipe the component belongs to |
| `component_id` | ref → product | `none` | nej | `manufacturing.user` | i klartext | The product consumed |
| `quantity` | number | `none` | nej | `manufacturing.user` | i klartext | Units of the component used per run |

### `manufacturing_order`

An instruction to produce a quantity of a product

Läsgrupp: `manufacturing.user`. Skrivgrupp: `manufacturing.user`.

| Fält | Typ | Dataklass | Personuppgift | Grupp | Agenter ser | Beskrivning |
|---|---|---|---|---|---|---|
| `reference` | text | `none` | nej | `manufacturing.user` | i klartext | Order number, for example MO-0042 |
| `bom_id` | ref → manufacturing_bom | `none` | nej | `manufacturing.user` | i klartext | The recipe to follow |
| `quantity` | number | `none` | nej | `manufacturing.user` | i klartext | Units of the finished product to make |
| `planned_on` | date | `none` | nej | `manufacturing.user` | i klartext | Date production should start (YYYY-MM-DD) |
| `deadline` | date | `none` | nej | `manufacturing.user` | i klartext | Date the goods are needed (YYYY-MM-DD) |
| `responsible` | text | `internal` | ja | `manufacturing.user` | maskerad | Name of the person in charge of the run |
| `state` | select (draft, confirmed, in_progress, done, cancelled) | `none` | nej | `manufacturing.user` | i klartext | Order status: draft, confirmed, in_progress, done, cancelled |

## Arbetsflöden

### `manufacturing_order`

| Åtgärd | Flyttar | Vem får köra den | Godkännande |
|---|---|---|---|
| `manufacturing_order.confirm` | state: draft → confirmed | `manufacturing.manager` | nej |
| `manufacturing_order.start` | state: confirmed → in_progress | `manufacturing.user` | nej |
| `manufacturing_order.finish` | state: in_progress → done | `manufacturing.user` | nej |
| `manufacturing_order.cancel` | state: draft → cancelled | `manufacturing.user` | nej |

## Behörighetsgrupper

Grupper som den här appen använder:

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

## Steg som kräver godkännande

Inget steg i den här appen kräver godkännande, förutom att ta bort poster.

## Vad agenter kan och inte kan göra

En agent kan läsa, söka, skapa och uppdatera poster i den här appen, och köra de åtgärder som inte kräver godkännande, inom behörighetsgrupperna för sin token.

Den kan bara föreslå de här stegen, och en person måste godkänna dem: `manufacturing_bom.delete`, `manufacturing_bom_line.delete`, `manufacturing_order.delete`.

Personuppgifter maskeras som platshållare: `manufacturing_order.responsible`.

## Beroenden

- `product`

## Installera

Installera den från appen Customize (Marknadsplats), eller från kommandoraden:

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

Kräver en databas och administratörsbehörighet.

## Bygg din egen

[Modulguiden visar hur appar som den här skrivs](/sv/docs/reference/module-manifest/)
