ppm_change_request_submit
Submit a draft Change Request to initiate review and get a sequence number assigned.
Instructions
Submit a draft Change Request for review; assigns a sequence number.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cr_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/qod_ppm_mcp/server.py:162-166 (handler)The tool handler function. Calls the Odoo server-side action_submit method on ppm.change.request and returns the updated record state.
@mcp.tool() def ppm_change_request_submit(cr_id: int) -> dict[str, Any]: """Submit a draft Change Request for review; assigns a sequence number.""" client().call_action("ppm.change.request", "action_submit", [cr_id]) return _read_state("ppm.change.request", cr_id, _CR_FIELDS) - src/qod_ppm_mcp/server.py:159-159 (schema)Fields read back after the action to return current state of the Change Request.
_CR_FIELDS = ["name", "state", "project_id", "change_type", "priority", "initiator_id"] - src/qod_ppm_mcp/server.py:162-162 (registration)Registered as an MCP tool via the @mcp.tool() decorator on FastMCP instance 'mcp'.
@mcp.tool() - src/qod_ppm_mcp/server.py:30-34 (helper)Helper that reads the record back from Odoo after the action to return updated state.
def _read_state(model: str, rec_id: int, fields: list[str]) -> dict[str, Any]: rows = client().read(model, [rec_id], fields) if not rows: raise ValueError(f"{model} id={rec_id} not found") return rows[0] - src/qod_ppm_mcp/client.py:122-124 (helper)OdooClient.call_action wraps execute_kw to invoke server-side action methods (used here as action_submit on ppm.change.request).
def call_action(self, model: str, method: str, ids: list[int]) -> Any: """Invoke an `action_*` button method on the given record ids.""" return self.execute_kw(model, method, [ids])