project_profitability
Evaluate project profitability by reporting delivery hours, costs, revenue, and budget burn, then issue a per-project verdict (on track, at risk, off track).
Instructions
Report delivery hours, money and budget burn per project in one call.
Composes active project.project records (filtered by name / manager / customer) with timesheet hours (account.analytic.line grouped by project), analytic cost/revenue (grouped by analytic account) and the Budgets app when installed, into a per-project burn verdict (off_track / at_risk / on_track). When the filter matches exactly one project the report gains per-employee and per-task breakdowns.
Args: project: Optional project-name filter (name ilike). Exactly one match switches on the drill-down breakdowns. manager: Optional project-manager filter (user_id.name ilike). customer: Optional customer filter (partner_id.name ilike). date_from: Optional YYYY-MM-DD lower bound on logged hours and analytic amounts. Allocated hours and budgets stay lifetime totals, so ANY date filter disables the burn verdicts (verdict "n/a", burn percentages null). date_to: Optional YYYY-MM-DD upper bound (same caveat). top_n: Rows in the drill-down breakdowns (default 5). burn_pct_at_risk: Worst burn %% >= this -> at_risk (default 80). burn_pct_off_track: Worst burn %% >= this -> off_track (default 100). timezone_offset: UTC offset for "today" (default 7).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| date_to | No | ||
| manager | No | ||
| project | No | ||
| customer | No | ||
| date_from | No | ||
| timezone_offset | No | ||
| burn_pct_at_risk | No | ||
| burn_pct_off_track | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |