ppm_export_budget
Export budget lines to an XLSX file with optional filters by project, portfolio, date, category, or include closed items. Returns a direct download URL.
Instructions
Export budget lines to XLSX. Returns the download URL action.
At least one of project_id or portfolio_id is typically set; omit both
to export everything visible to the service user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | ||
| portfolio_id | No | ||
| date_from | No | ||
| date_to | No | ||
| category_id | No | ||
| include_closed | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/qod_ppm_mcp/server.py:372-397 (handler)The main handler function for ppm_export_budget tool. It collects optional parameters (project_id, portfolio_id, date_from, date_to, category_id, include_closed) into a dictionary and delegates to _run_export_wizard('ppm.budget.export.wizard', vals).
@mcp.tool() def ppm_export_budget( project_id: int | None = None, portfolio_id: int | None = None, date_from: str | None = None, date_to: str | None = None, category_id: int | None = None, include_closed: bool = False, ) -> dict[str, Any]: """Export budget lines to XLSX. Returns the download URL action. At least one of `project_id` or `portfolio_id` is typically set; omit both to export everything visible to the service user. """ vals: dict[str, Any] = {"include_closed": include_closed} if project_id is not None: vals["project_id"] = project_id if portfolio_id is not None: vals["portfolio_id"] = portfolio_id if date_from: vals["date_from"] = date_from if date_to: vals["date_to"] = date_to if category_id is not None: vals["category_id"] = category_id return _run_export_wizard("ppm.budget.export.wizard", vals) - src/qod_ppm_mcp/server.py:362-369 (helper)The shared helper _run_export_wizard creates a wizard record via execute_kw, calls the action_export method, and returns the resulting download URL action.
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:372-372 (registration)The tool is registered via the @mcp.tool() decorator on line 372, which binds it into the FastMCP server as the 'ppm_export_budget' tool.
@mcp.tool()