Skip to content

Spare Parts: Reporting

My Open Requests view

:menuselection:Maintenance --> Operations --> Stock Requests --> My Open Requests

This is a filtered view of stock.picking records that are:

  • Linked to any maintenance.request (i.e., have a maintenance_request_id)
  • Not yet in a terminal state (not Done or Cancelled)

The view is scoped to "My" — pickings assigned to or related to the current user — so each technician sees only their own in-progress requests without noise from other team members.

List view columns

Column Field Notes
SR No. roots_request_no e.g., SR/2026/00042 — hyperlinks to the picking form
Reference name System picking reference (WH/CONS/00042)
Maintenance Request maintenance_request_id Links to the source PM or corrective request
Equipment maintenance_request_id.equipment_id Convenience — equipment name for context
Scheduled Date scheduled_date When the picking is due
State state Draft / Ready / Waiting / Done / Cancelled
Pending Lines roots_pending_move_count How many stock moves are still open

Kanban view

The kanban view groups pickings by State, giving a visual pipeline of requests moving from Draft to Ready to Done. Each card shows:

  • SR number
  • Equipment name
  • Number of pending lines (progress bar: done lines / total lines)

Using search filters

The search bar on My Open Requests supports several pre-built filters:

Shows only pickings linked to maintenance requests where the current user is the assigned technician (maintenance_request_id.user_id = uid). This is the default filter for the "My Open Requests" action.

Filters to state in (draft, assigned, confirmed) — i.e., pickings that are not yet done or cancelled. Combine with Mine for the full "my active work" view.

Filters to pickings whose scheduled_date is in the past AND state is not done/cancelled. Useful for a manager review: which requests are running late?

To combine filters, click multiple filter chips — they are ANDed together. To save a custom filter combination for reuse:

  1. Set your filters
  2. :menuselection:Favorites --> Save current search
  3. Name it (e.g., "Ward 3 overdue SR") and optionally set as default

All Open Requests (not just mine)

BME Managers who want to see all open requests (not filtered to self) can go to :menuselection:Maintenance --> Operations --> Stock Requests (without the "My Open Requests" sub-item). This shows the unfiltered picking list for all requests.

Pending Items stat button on maintenance.request

On every maintenance request form that has a linked consumption picking, a Pending SR smart button appears in the header area.

  • Label: N Pending SR (where N = number of non-done pickings)
  • Field: roots_open_picking_count (computed, non-stored)
  • Click action: Opens a list of only the pending (non-done, non-cancelled) pickings for this request

Use this button to:

  • Quickly see whether stock has been pulled for this PM visit
  • Jump directly to the draft picking without navigating to the Inventory menu
  • Monitor whether a backorder is still open after a partial validation

Count goes to zero after validation

Once all pickings are validated (or cancelled), roots_open_picking_count drops to 0 and the button updates immediately. The technician can use this as a quick checklist signal that the parts work is done.

Equipment stat buttons: "N Spare Parts · N Critical Low"

On the equipment form header, two stat buttons are added by this module:

Spare Parts button

  • Label: N Spare Parts
  • Field: roots_spare_count — count of roots_spare_line_ids
  • Click action: Opens a filtered list of all spare lines for this equipment

Use this to:

  • Review the full template at a glance without opening the Spare Parts tab
  • Export the spare-line list to Excel for physical storeroom reconciliation

Critical Low button

  • Label: N Critical Low
  • Field: roots_critical_low_count — count of lines where roots_is_critical = True AND qty_available <= 0
  • Click action: Opens the same spare-line list, pre-filtered to critical lines with zero stock

When this number is greater than zero, it is a visual indicator that the equipment may not be serviceable on its next PM visit — parts are missing.

Act before the PM visit, not during

The Critical Low counter is most useful when reviewed during the week before a scheduled PM. If the number is non-zero, raise a Purchase Order or an internal transfer before the PM date so the technician is not blocked.

How to customise the SR sequence prefix

The SR number format (SR/2026/00001) is controlled by an ir.sequence record. You can change the prefix without developer mode disabled, but the Technical menu to access Sequences requires developer mode.

Steps

  1. Enable developer mode: :menuselection:Settings --> General Settings --> Developer Tools --> Activate the developer mode
  2. Navigate to :menuselection:Settings --> Technical --> Sequences & Identifiers --> Sequences
  3. Search for hemms.stock.request in the Code column
  4. Open the HEMMS Stock Request sequence
  5. Edit the Prefix field:
    • Default: SR/%(year)s/
    • Change SR to any prefix your hospital uses, e.g., SPR/%(year)s/
    • For no year in the prefix: SR/
    • For monthly reset format: SR/%(year)s/%(month)s/ and set Reset Frequency to Monthly
  6. Adjust Sequence Padding if needed (default 5 produces 00001 through 99999)
  7. Save

Prefix change is not retroactive

Existing SR numbers keep their old prefix. The new prefix applies only to pickings created after the save. If you need consistent numbering, change the prefix at the start of a new fiscal year.

Pivot and graph analysis

The standard stock.picking pivot and graph views work with maintenance-linked pickings. Two useful analyses:

Parts consumed per PM kind (month)

  1. :menuselection:Maintenance --> Operations --> Stock Requests
  2. Switch to Pivot view
  3. Set rows to maintenance_request_id.maintenance_kind_id, columns to the month of date_done, and measure to line count or quantity
  4. Result: how many SR lines were consumed per PM kind each month

Top-consumed products (year-to-date)

  1. :menuselection:Inventory --> Operations --> Transfers
  2. Filter: Operation Type = Consumption AND Date Done = this year
  3. Group by Product, switch to Graph view, Bar chart
  4. Shows which products are consumed most across all maintenance activities

Exporting SR data for audit

For HA Thailand traceability audits, the key export links SR pickings to their source PM requests and shows exactly what was consumed.

  1. :menuselection:Maintenance --> Operations --> Stock Requests
  2. Filter: State = Done AND Scheduled Date in the audit period
  3. Select all rows (checkbox in list header)
  4. :menuselection:Action --> Export
  5. Include these fields:

    Field What it shows
    roots_request_no SR number for audit reference
    maintenance_request_id.name Linked work order
    maintenance_request_id.equipment_id.name Equipment
    maintenance_request_id.maintenance_kind_id.name PM kind
    date_done Date stock was consumed
    move_ids.product_id.name Product name
    move_ids.quantity Quantity consumed
  6. Export as XLSX and attach to the HA audit folder

Next steps