Sistema MRP organises material flow in four sequential steps: a requirement is raised at a work-site warehouse, available stock is reserved in the principal warehouse, a dispatch moves that stock out with a Guía de Remisión, and a receipt confirms arrival at the obra. Every step is traceable through movement records, and pending requirements are automatically re-evaluated whenever new stock arrives.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ElthonJohan/Sistema-MRP/llms.txt
Use this file to discover all available pages before exploring further.
The four-step cycle
| Step | Service | Movement |
|---|---|---|
| Requirement | requirement_service.create_requirement() | — (reservation only) |
| Dispatch | dispatch_service.create_dispatch() | OUT on principal warehouse |
| Receipt | receipt_service.create_receipt() | IN on obra warehouse |
Statuses
Requirement statuses
| Status | Meaning |
|---|---|
pending | Created; no dispatch has been issued yet. Items may be reserved or pending. |
partial | At least one dispatch exists but not all requested quantities have been dispatched. |
fulfilled | All items have been fully dispatched. |
cancelled | Cancelled manually; all reserved stock has been released. |
RequirementItem statuses
| Status | Meaning |
|---|---|
reserved | Stock has been successfully reserved in the principal warehouse. |
pending | Insufficient stock at reservation time; item is waiting for stock. |
partial | Some quantity has been dispatched but not the full amount. |
fulfilled | The full requested quantity has been dispatched. |
Stock invariant
At all times the following relationship holds for everyInventory record in the principal warehouse:
reserve_stock() checks stock - reserved >= requested_qty before incrementing reserved. It does not commit — the caller commits after all items in the requirement are processed. This keeps the reservation atomic across multiple materials.
Step-by-step pages
Warehouses & Materials
Set up the principal warehouse and obra warehouses, then register materials with unit prices.
Inventory
Add stock to the principal warehouse, view reservations, and handle frozen records.
Requirements
Create material requirements linked to a project and monitor automatic stock reservation.
Dispatches
Generate dispatches from requirements, decrement stock, and download the Guía de Remisión PDF.
Receipts
Confirm material arrival at the obra warehouse and record the IN movement.
Whenever stock is added to the principal warehouse,
inventory_service.add_stock() automatically calls reprocess_requirements(). This function scans all pending and partial requirements and attempts to reserve stock for any items still in pending status — no manual intervention is needed.