Create a draft invoice
Create a customer invoice in Draft status.
MCP tool odoo_write → create_draft_invoice
write
Creates the invoice in Draft status and returns its ID and totals. A draft has no accounting impact and no number until it is confirmed, so it reaches nobody and does not wait for your OK. Confirm it with post_invoice.
Parameters
| Name | Type | Description |
|---|---|---|
| contact_id integer required | integer | Contact ID from list_contacts or create_contact. |
| lines array required | array | Invoice lines: description (string), quantity (number), unit_price (number). |
| invoice_date date | date | Invoice date. Default: today. |
| due_date date | date | Due date. Default: from the contact's payment terms. |
| reference string | string | Customer reference shown on the invoice. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "odoo_write",
"arguments": {
"operation": "create_draft_invoice",
"arguments": {
"contact_id": 931,
"invoice_date": "2026-10-31",
"due_date": "2026-11-14",
"lines": [
{
"description": "Monthly retainer, October",
"quantity": 1,
"unit_price": 2400
}
]
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"invoice_id": 4201,
"number": null,
"contact": "Northwind Studio",
"status": "draft",
"payment_status": "not_paid",
"invoice_date": "2026-10-31",
"due_date": "2026-11-14",
"lines": [
{
"description": "Monthly retainer, October",
"quantity": 1,
"unit_price": 2400,
"subtotal": 2400
}
],
"amount_untaxed": 2400,
"amount_tax": 0,
"amount_total": 2400,
"currency": "EUR"
},
"isError": false
}