Workflow Tools¶
These tools let the AI see what states a record is in and trigger Odoo workflow transitions — for example, confirming a quotation, posting an invoice, or marking a project task as done.
get_workflow_state¶
Returns:
The current
state(or equivalent status field) of the record.The list of available transition button-actions — public Odoo methods like
action_confirm,action_cancel,action_post— that the AI can call next.
This means the AI does not have to guess Odoo method names; it discovers them at runtime per record.
Category: workflow. Risk: low.
transition_state¶
Calls one of the transition methods returned by
get_workflow_state. The AI passes the model, the record ID,
and the chosen action name. The tool returns the new state on
success.
Category: workflow. Risk: medium.
Example workflow¶
Here is the kind of conversation a typical user has:
User: “Confirm quotation S00037 if it’s still in draft.”
The AI does this in two MCP calls:
search_recordsonsale.orderwith domain[('name','=','S00037')]→ returns ID 42.get_workflow_stateonsale.orderID 42 → returnsstate = "draft"and available actions includingaction_confirm.transition_stateonsale.orderID 42 with actionaction_confirm→ returns the newstate = "sale".
The AI replies to the user that the quotation has been confirmed.
Safety rails¶
Workflow transitions are real Odoo writes. The standard security applies:
The connection’s Allowed Models must allow the target model.
The Odoo user behind the connection must have the right to call the method on the record.
If the connection has
transition_statein its Tools that need approval list, the AI’s request becomes a pending approval — see Human-in-the-Loop Approvals.
Tip
Many admins gate transition_state behind approvals for
write connections, then leave it open for read-only
connections (where it is a no-op anyway because ACLs
reject the call).