ppm_milestone_miss
Mark a milestone as missed to update its status and trigger related workflow actions.
Instructions
Mark a milestone as missed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| milestone_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/qod_ppm_mcp/server.py:58-62 (handler)Handler function for the ppm_milestone_miss tool. Calls action_miss on the ppm.milestone model via the Odoo client, then returns the updated record state.
@mcp.tool() def ppm_milestone_miss(milestone_id: int) -> dict[str, Any]: """Mark a milestone as missed.""" client().call_action("ppm.milestone", "action_miss", [milestone_id]) return _read_state("ppm.milestone", milestone_id, _MILESTONE_FIELDS) - src/qod_ppm_mcp/server.py:58-59 (registration)Registration of ppm_milestone_miss as an MCP tool via the @mcp.tool() decorator on the FastMCP instance.
@mcp.tool() def ppm_milestone_miss(milestone_id: int) -> dict[str, Any]: - src/qod_ppm_mcp/server.py:30-34 (helper)Helper function _read_state used by ppm_milestone_miss to fetch and return the updated milestone record after the action.
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 — the low-level helper that invokes action_miss on the ppm.milestone model via JSON-RPC execute_kw.
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]) - src/qod_ppm_mcp/server.py:41-42 (schema)Schema fields returned by the ppm_milestone_miss tool — the list of Odoo fields read from the milestone after the action.
_MILESTONE_FIELDS = ["name", "state", "date_planned", "date_actual", "project_id"]