Create a manufacturing order
dolibarr_mo_createCreates a draft manufacturing order for a product, using a BOM to set consume and produce lines; validate the MO in Dolibarr's web interface before posting production.
Instructions
Creates a draft MO for a product. With a BOM, the lines to consume and produce are taken from it. The standard API has no route to validate an MO: the user validates it in the Dolibarr web interface before production can be posted with dolibarr_mo_produce.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"product_id": "<product_id>",
"qty": "<qty>"
},
"name": "dolibarr_mo_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | Yes | ||
| label | No | ||
| bom_id | No | A validated BOM for this product. | |
| product_id | Yes | ||
| project_id | No | ||
| note_private | No | ||
| warehouse_id | No | Warehouse the finished product goes to. | |
| thirdparty_id | No | Customer the MO is made for. | |
| date_end_planned | No | Date as YYYY-MM-DD. | |
| date_start_planned | No | Date as YYYY-MM-DD. |