execute_method
Execute custom methods on Odoo models to perform specific actions like confirming orders or updating records, requiring proper permissions in Odoo settings.
Instructions
Execute a custom method on an Odoo model.
Args:
model: The Odoo model name
method: The method name to call
record_ids: Optional list of record IDs to call the method on
args: Positional arguments for the method
kwargs: Keyword arguments for the method
Returns:
Method result
⚠️ Note: This requires special permission in Odoo settings.
Example:
Confirm sale order: model='sale.order', method='action_confirm', record_ids=[5]
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>",
"method": "<method>"
},
"name": "execute_method"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| method | Yes | ||
| record_ids | No | ||
| args | No | ||
| kwargs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |