Preventive Maintenance: Reporting¶
The module doesn't ship its own report views — reporting is built from combinations of existing kanban, list, and search filters across the 3 layers.
Operational dashboards¶
"What PM is due this month?"¶
- :menuselection:
Maintenance --> Maintenance Plans - Filter: Next Maintenance Date = this month
- Group by: Equipment → see all plans grouped by asset
"What PM is overdue?"¶
- :menuselection:
Maintenance --> Maintenance Requests - Filter: SLA Breached = True AND Maintenance Type = Preventive
- Result: every PM request that has stayed in its current stage longer than allowed
"Which equipment has no PM plan?"¶
- :menuselection:
Maintenance --> Equipment - Filter: Maintenance Plan Count = 0 (custom filter — add via search :guilabel:
Filtersmenu) - Result: equipment with no scheduled PM — gap to fill
"How long does each PM kind actually take?"¶
- :menuselection:
Maintenance --> Maintenance Requests - Filter: Maintenance Type = Preventive AND State = Done
- Group by: Maintenance Kind
- Pivot view: rows = kind, columns = month, values = average duration
SLA metrics¶
The roots_is_sla_breached boolean field exposes SLA status. Useful slicings:
Breach rate by stage¶
-- Roughly, via Odoo's read_group
domain = [
('maintenance_type', '=', 'preventive'),
('roots_is_sla_breached', '=', True),
]
groupby = ['stage_id']
aggregates = ['__count']
Breach rate by responsible role¶
self.env['maintenance.request']._read_group(
domain=[('maintenance_type', '=', 'preventive')],
groupby=['stage_id.roots_responsible_role'],
aggregates=['__count', 'roots_is_sla_breached:array_agg'],
)
Useful for identifying bottlenecks — if "BME Manager" is responsible for the most breaches, the Pending Review or Awaiting Pickup stages need attention.
Compliance reports¶
For HA Thailand audit, the key questions are:
"What % of critical equipment had on-schedule PM this year?"¶
For each red-criticality equipment:
- Count completed PM requests in the year
- Count expected (based on plan intervals)
- Coverage = completed / expected
Build via:
- Search criticality red equipment:
[('roots_criticality_color', '=', 'red')] - For each, query
maintenance_request_idsfiltered by year + maintenance_type=preventive + state=done - Compare to expected count from
maintenance_plan.intervalandinterval_step
"Audit trail for a specific PM request"¶
Open the request → Audit Trail tab. Export the hemms.stage.transition.log list view to Excel for auditor handover.
"All PM activities for a specific equipment, FY 2569"¶
- :menuselection:
Maintenance --> Equipment→ open the equipment - Maintenance tab → smart button N Maintenances
- Apply filter Request Date >= 2025-10-01 AND <= 2026-09-30 (Thai fiscal year 2569)
- Export to Excel
Built-in chart views¶
Kanban, pivot, and graph views are available on maintenance.request out of the box. To build a custom dashboard:
- :menuselection:
Maintenance --> Maintenance Requests - Apply your filter (e.g., type=preventive, last 90 days)
- Switch to Pivot view
- Drag fields to rows/columns/measures
- :guilabel:
Favorites→ :guilabel:Save current search→ check Use by default
Future quick-win Q7 will add a dedicated roots_hemms_dashboard module with pre-built executive views.
Exporting data¶
To Excel/CSV¶
- List view → select rows
- :menuselection:
Action --> Export - Choose fields:
name,equipment_id.name,maintenance_kind_id.namerequest_date,close_datestage_id.name,roots_is_sla_breachedroots_stage_transition_log_ids.transitioned_at(for audit trail)
To PDF (corrective request format)¶
OCA's base_maintenance adds a per-request PDF report. The same report works for PM requests:
- Open the PM request
- :menuselection:
Print --> Maintenance Request - PDF includes: equipment info, instructions, dates, parts used (if
maintenance_stockis installed)
Future reporting work¶
These are not in this module but on the roadmap:
- 📋 Q1.5 — Meter-based PM coverage report
- 📋 Q5 — HA Thailand-format annual PM report (Thai-government PDF)
- 📋 Q7 — Executive dashboard with PM coverage, SLA breach rate, and parts-used trends
Next steps¶
- Get Started — Run through the basic walkthrough
- Configuration — Tune the module for your hospital
- Annual Asset Inspection — Annual stock-check workflow that complements ongoing PM