[IMP] project-dashboard-billable-hours add readme and docstrings

This commit is contained in:
2026-10-20 11:37:39 +02:00
parent 1493a4a25e
commit 51f37025a3
2 changed files with 70 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
# Project Dashboard - Billable Hours
Display billable hours — timesheets linked to a sales order line — in the project dashboard panel.
This module extends the `project.project` dashboard with a "Billable Time" stat button showing the ratio of billable timesheets to total recorded timesheets.
## Features
- `billable_hours` computed field on projects: sum of timesheet hours whose `so_line` is set (computed in SQL via `_read_group` for batch performance).
- "Billable Time" stat button on the project dashboard, displaying
`billable / effective <uom>` with the company's timesheet encoding unit.
- Billable rate coloring:
- red when the rate is below 50%,
- orange when the rate is below 80%,
- green when the rate is 80% or above.
- Clicking the button opens the project's billable timesheets (timesheets linked to a sales order line), reusing the `sale_timesheet` billable time action with a restricted domain.
The button is only visible to users in the `hr_timesheet.group_hr_timesheet_user` group, on projects with both billing and timesheets enabled (`allow_billable` and `allow_timesheets`).
## Installation
- Odoo 18.0
- Depends on `sale_timesheet` (which brings `sale`, `hr_timesheet` and `project`).
## Credits
- Author: Elabore
- Contributor: Maud Buchwalter - Assisted by AI
- Repository: <https://git.elabore.coop/elabore/project-tools>
- License: AGPL-3