ppm_export_resources
Export resource allocations to XLSX. Filter by project, employee, department, date range, or include cancelled allocations.
Instructions
Export resource allocations to XLSX.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | ||
| employee_id | No | ||
| department_id | No | ||
| date_from | No | ||
| date_to | No | ||
| include_cancelled | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/qod_ppm_mcp/server.py:421-442 (handler)The main handler function for the ppm_export_resources tool. It builds a dict of filter values from optional parameters (project_id, employee_id, department_id, date_from, date_to, include_cancelled) and delegates to _run_export_wizard('ppm.resource.export.wizard', vals) to create a wizard record and trigger the export action.
@mcp.tool() def ppm_export_resources( project_id: int | None = None, employee_id: int | None = None, department_id: int | None = None, date_from: str | None = None, date_to: str | None = None, include_cancelled: bool = False, ) -> dict[str, Any]: """Export resource allocations to XLSX.""" vals: dict[str, Any] = {"include_cancelled": include_cancelled} if project_id is not None: vals["project_id"] = project_id if employee_id is not None: vals["employee_id"] = employee_id if department_id is not None: vals["department_id"] = department_id if date_from: vals["date_from"] = date_from if date_to: vals["date_to"] = date_to return _run_export_wizard("ppm.resource.export.wizard", vals) - src/qod_ppm_mcp/server.py:421-421 (registration)The @mcp.tool() decorator on line 421 registers the ppm_export_resources function as an MCP tool with the FastMCP instance.
@mcp.tool() - src/qod_ppm_mcp/server.py:362-369 (helper)The _run_export_wizard helper function that ppm_export_resources delegates to. It creates a wizard record via execute_kw, calls the action_export button method on it, and returns the download URL action from the response.
def _run_export_wizard( model: str, values: dict[str, Any], ) -> dict[str, Any]: wizard_id = client().execute_kw(model, "create", [values]) action = client().call_action(model, "action_export", [wizard_id]) # action is `ir.actions.act_url` with /web/content/{attachment_id}?download=true return {"wizard": model, "action": action} - src/qod_ppm_mcp/server.py:422-429 (schema)The function signature defines the input schema: optional project_id (int), employee_id (int), department_id (int), date_from/date_to (str), and include_cancelled (bool, default False). The return type is dict[str, Any] with keys 'wizard' and 'action'.
def ppm_export_resources( project_id: int | None = None, employee_id: int | None = None, department_id: int | None = None, date_from: str | None = None, date_to: str | None = None, include_cancelled: bool = False, ) -> dict[str, Any]: