Skip to content

Preventive Maintenance: Configuration

This page covers everything an admin can configure on the PM module after installation.

Adding custom maintenance kinds

The 3 seeded kinds (Calibration, Safety Inspection, General PM) are a starting point. Hospitals typically add 5–15 more depending on their equipment fleet.

Add a kind via the UI

  1. :menuselection:Maintenance --> Configuration --> Maintenance Kinds
  2. Click :guilabel:New
  3. Fill in:
    • Name — English label, e.g., Filter Replacement
    • ชื่อ (Thai) — Thai label, e.g., เปลี่ยนตัวกรอง
    • Description — Optional free-form note
  4. Save

The new kind is immediately available in the Maintenance Kind dropdown when creating a maintenance.plan on any equipment.

Common hospital kinds to add

English Thai Typical use
Battery Replacement เปลี่ยนแบตเตอรี่ Defibrillators, UPS, vital monitors
Filter Replacement เปลี่ยนตัวกรอง Ventilators, HEPA filter equipment
Cryogen Refill เติมสารหล่อเย็น MRI machines
Bulb / Lamp Check ตรวจสอบหลอดไฟ Surgical lights, microscopes
Software Update อัปเดตซอฟต์แวร์ Imaging systems, lab analyzers
Wheel / Brake Check ตรวจสอบล้อ/เบรก Wheelchairs, mobile stands
Annual Certification รับรองประจำปี Regulated devices needing 3rd-party cert

Renaming or archiving a seeded kind

The 3 default kinds are loaded with noupdate="1" — admins can:

  • Rename the English or Thai label freely
  • Archive (active=False) a kind they don't use
  • Both changes survive future upgrades of roots_hemms_pm

You cannot delete a kind that's referenced by an existing maintenance.plan or maintenance.request — Odoo's ondelete="restrict" will block the deletion with a clear error message.

Configuring the PM Scheduled stage

The seeded stage "PM Scheduled (ตามแผนบำรุงรักษา)" is fully editable.

Stage settings

Go to :menuselection:Maintenance --> Configuration --> Stages and open "PM Scheduled":

Field Default Notes
Name "PM Scheduled (ตามแผนบำรุงรักษา)" Rename freely
Sequence 5 Determines kanban column order — keep < 10 to appear before "Submitted"
Fold False Toggle on to collapse the column by default
Done False If True, requests in this stage count as "done" (don't change unless you know why)
PM Initial Stage True This is what makes the stage the PM entry point — exactly one stage can have this flag
Responsible Role BME Technician Used by roots_hemms_workflow to suggest the responsible user
SLA Hours 72 How long before a request in this stage is flagged as breached
Description (Thai) (default text) Shown on the form / report

Moving the PM-initial flag to a different stage

If you want PM requests to enter at a different point in the workflow (e.g., directly into "In Repair" because your team auto-assigns):

  1. Untoggle PM Initial Stage on "PM Scheduled"
  2. Save
  3. Toggle PM Initial Stage on the target stage (e.g., "In Repair")
  4. Save

The SQL constraint single_pm_initial enforces that only one stage holds the flag at any time.

Configuring the auto-generation cron

The OCA cron runs daily and generates PM requests within each plan's maintenance_plan_horizon window.

  1. :menuselection:Settings --> Technical --> Scheduled Actions
  2. Find "Maintenance: generate preventive maintenance requests"
  3. Adjust:
    • Active — Toggle off to disable PM auto-generation entirely
    • Interval Number + Interval Type — How often the cron fires (default: every 1 day)
    • Next Execution Date — When the next run happens

Don't run the cron more than once per day

The cron is idempotent (won't double-create requests for the same plan date), but each run touches every active plan — frequent runs add load without benefit.

Suggested frequencies by equipment criticality

There's no automatic frequency suggestion — admins set interval on each plan manually. As a guideline based on equipment criticality color:

Criticality Suggested interval Rationale
🔴 Critical (red) 1–3 months ICU / OR equipment — tight PM cycle
🟡 Watch (yellow) 3–6 months Important but not life-support
🟢 Normal (green) 6–12 months Standard biomedical equipment

These are starting points only — adjust to manufacturer recommendations, regulatory requirements (TGA, FDA, ISO 13485), and your hospital's history with each equipment type.

Security

The PM module inherits ACLs from:

  • maintenance_plan (OCA) — Maintenance User can read; Maintenance Manager can write
  • roots_hemms_workflow — Department-scoped record rules on maintenance.request

No new groups or ACLs are added by this module.

Next steps