ppm_milestone_start
Start a milestone by moving it from planned to in progress, enabling work to begin.
Instructions
Transition a milestone from 'planned' to 'in_progress'.
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:44-48 (handler)The `ppm_milestone_start` tool handler. Decorated with @mcp.tool(), it calls `ppm.milestone` Odoo model action 'action_start' with the given milestone_id, then returns the updated milestone record fields (name, state, date_planned, date_actual, project_id).
@mcp.tool() def ppm_milestone_start(milestone_id: int) -> dict[str, Any]: """Transition a milestone from 'planned' to 'in_progress'.""" client().call_action("ppm.milestone", "action_start", [milestone_id]) return _read_state("ppm.milestone", milestone_id, _MILESTONE_FIELDS) - src/qod_ppm_mcp/server.py:41-41 (helper)Constant `_MILESTONE_FIELDS` defining the fields fetched after the milestone action: name, state, date_planned, date_actual, project_id.
_MILESTONE_FIELDS = ["name", "state", "date_planned", "date_actual", "project_id"] - src/qod_ppm_mcp/server.py:30-34 (helper)Helper `_read_state` used to read and return the milestone record after the action is performed.
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/server.py:44-44 (registration)Registration via `@mcp.tool()` decorator on line 44 which registers the function as an MCP tool.
@mcp.tool() - src/qod_ppm_mcp/server.py:23-27 (helper)Helper `client()` function that creates/reuses the OdooClient instance used to call Odoo server actions.
def client() -> OdooClient: global _client if _client is None: _client = OdooClient.from_env() return _client