ppm_status_report_print_url
Retrieve the URL to view a status report as a PDF in Odoo. Provide a report ID to get the direct download link.
Instructions
Return the Odoo URL for the PDF render of a status report.
Odoo returns a report action; the caller fetches the PDF via that URL using the same credentials.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/qod_ppm_mcp/server.py:144-152 (handler)The handler function for the ppm_status_report_print_url MCP tool. Calls Odoo's action_print_report on ppm.status.report and returns the action (URL) along with the report_id.
@mcp.tool() def ppm_status_report_print_url(report_id: int) -> dict[str, Any]: """Return the Odoo URL for the PDF render of a status report. Odoo returns a report action; the caller fetches the PDF via that URL using the same credentials. """ action = client().call_action("ppm.status.report", "action_print_report", [report_id]) return {"report_id": report_id, "action": action} - src/qod_ppm_mcp/server.py:144-144 (registration)Registration via the @mcp.tool() decorator, which registers the function as an MCP tool named 'ppm_status_report_print_url'.
@mcp.tool() - src/qod_ppm_mcp/client.py:122-124 (helper)Helper method on OdooClient that invokes the action method via execute_kw. Called by the handler to trigger action_print_report.
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])