odoo_create
odoo_createCreate records in Odoo as reviewable drafts by filling form fields, then return an approval link so the user can review and save the change.
Instructions
Create a record, filling the fields the user could fill on its form. Every change is a draft: it is saved when the user opens the returned link in Odoo and approves it. Give them the link.
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": {
"model": "<model>",
"values": "<values>"
},
"name": "odoo_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draft | No | true: returns a link where the user reviews and approves the change in Odoo. false: saves now. | |
| model | Yes | Technical model name, e.g. "sale.order". | |
| reason | No | With draft=false: why it is right to save without the user approving it (what they asked and why the values are correct). Kept in the call log. | |
| values | Yes | Field name -> value, as on the form (odoo_browse describe=true lists them). many2one: an id; many2many: the full list of ids; dates "YYYY-MM-DD", datetimes "YYYY-MM-DD HH:MM:SS" in UTC. Lines (one2many) are records of their own: create each with odoo_create, pointing to its parent. A long text, HTML or file value: give {"upload": true} for that one field and send it to the returned upload_url. |