Skip to content

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?"

  1. :menuselection:Maintenance --> Maintenance Plans
  2. Filter: Next Maintenance Date = this month
  3. Group by: Equipment → see all plans grouped by asset

"What PM is overdue?"

  1. :menuselection:Maintenance --> Maintenance Requests
  2. Filter: SLA Breached = True AND Maintenance Type = Preventive
  3. Result: every PM request that has stayed in its current stage longer than allowed

"Which equipment has no PM plan?"

  1. :menuselection:Maintenance --> Equipment
  2. Filter: Maintenance Plan Count = 0 (custom filter — add via search :guilabel:Filters menu)
  3. Result: equipment with no scheduled PM — gap to fill

"How long does each PM kind actually take?"

  1. :menuselection:Maintenance --> Maintenance Requests
  2. Filter: Maintenance Type = Preventive AND State = Done
  3. Group by: Maintenance Kind
  4. 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:

  1. Search criticality red equipment: [('roots_criticality_color', '=', 'red')]
  2. For each, query maintenance_request_ids filtered by year + maintenance_type=preventive + state=done
  3. Compare to expected count from maintenance_plan.interval and interval_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"

  1. :menuselection:Maintenance --> Equipment → open the equipment
  2. Maintenance tab → smart button N Maintenances
  3. Apply filter Request Date >= 2025-10-01 AND <= 2026-09-30 (Thai fiscal year 2569)
  4. 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:

  1. :menuselection:Maintenance --> Maintenance Requests
  2. Apply your filter (e.g., type=preventive, last 90 days)
  3. Switch to Pivot view
  4. Drag fields to rows/columns/measures
  5. :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

  1. List view → select rows
  2. :menuselection:Action --> Export
  3. Choose fields:
  4. name, equipment_id.name, maintenance_kind_id.name
  5. request_date, close_date
  6. stage_id.name, roots_is_sla_breached
  7. roots_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:

  1. Open the PM request
  2. :menuselection:Print --> Maintenance Request
  3. PDF includes: equipment info, instructions, dates, parts used (if maintenance_stock is 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