HR Document Expiry Register
Track employee passports, visas and licences with a live expiry status and a daily reminder, on an audited, company-scoped register.
Why this module
HR Document Expiry Register
Status that never goes stale
The validity status and days to expiry are computed from the expiry date, not stored, so a document reads valid today and expiring tomorrow without any rewrite. No batch job has to touch the row to keep it honest.
A reminder you do not have to remember
A daily cron scans for documents inside the 30 day window and posts a note in the document chatter, so renewals surface in the record followers feed instead of waiting for someone to open a spreadsheet.
Every change is on the record
Records inherit the platform audited mixin, so create, write and delete are written to an append only, hash chained audit log. The register is also strictly company scoped, with cross company writes refused unless an audited override is set.
Day in the life
A visa that would have slipped through
An HR officer logs a new hire's work visa with its expiry date. The list shows it green as valid. Twenty days before it lapses the status flips to expiring soon, the row turns amber in the list, and the morning cron drops a note into the document chatter so the officer and any followers see it. The officer renews it, updates the date, and the write is recorded in the audit log with the before and after values, all without leaving the employee record.
Edge cases
The cases most modules quietly ignore.
In the shipped code today, each one a place where a cheaper module silently does the wrong thing.
Status and days to expiry are non stored computes keyed on the expiry date, so a record moves from valid to expiring to expired purely as time passes, with no nightly rewrite needed to keep the value true.
A blank expiry date is a first class state: the document reports status none and zero days, so permanent documents like certificates are not falsely flagged as expired or expiring.
The reminder cron only selects documents whose expiry date is between today and the 30 day horizon, so already expired and far future documents are skipped and the job stays cheap and idempotent on each daily run.
Audit rows are written under a transaction scoped Postgres advisory lock with a fixed app wide key, so the hash chain stays strictly ordered even when several users save documents at the same instant.
Company id defaults to the active company and is required. A write that moves a document into a company the user does not belong to is refused with an AccessError, and any permitted cross company elevation is itself written to the audit log.
The audit trail is append only and hash chained: each row's SHA-256 hash folds in the previous row's hash, so any after the fact edit breaks the chain and is caught by the platform chain verification.
The employee self group has read only access; only the HR officer and admin groups can create or edit documents, and only admin can delete, so staff can see their own records without altering compliance data.
What is inside
Built to do the job, end to end.
- Document model. eh.hr.document holds the title, employee link, document type, official number, issue date and expiry date. The employee link is indexed and cascades on delete, and records sort by expiry date so the nearest deadline is at the top.
- Document type taxonomy. A required type selection covers passport, visa or permit, licence, contract, certificate and other, giving a consistent vocabulary for filtering and reporting across the workforce.
- Computed expiry fields. days_to_expiry and status are computed together from the expiry date. The window for expiring soon is 30 days; a negative day count reads as expired, a blank expiry reads as no expiry.
- Daily expiry cron. A code based ir.cron runs once a day, finds documents entering the expiry window, and posts a chatter message naming the document and its expiry date on each one.
- List and form views. The list decorates expired rows in red and expiring rows in amber, and the form pairs identity fields with dates and status alongside a chatter thread for history and follower notifications.
- Access and audit wiring. Three CSV access rules map to the platform HR admin, officer and self service groups, while the audited and company aware mixins add the hash chained log and strict company isolation.
Honest about the edges
What this does not do, so nothing surprises you.
- This module records document metadata and dates. It does not add a file upload field of its own; attach scans through the standard chatter on the document.
- The expiring soon window is fixed at 30 days in code and is not a configurable setting in this version.
- The daily reminder posts a note in the document chatter for followers. It does not send standalone emails or build a separate digest.
- There is no approval, renewal or e-signature workflow and no document request wizard; the module is a register with expiry tracking, not a case management tool.
- Requires the EH HR Platform: it depends on eh_hr_core and eh_hr_compat alongside the standard hr module, and is not a standalone app.
- Targets Odoo 18 Community. Status, audit and company scoping behave as described on that series.
HR document expiry tracking Odoo 18, employee passport visa licence register, document renewal reminder cron, expiry date status compute Odoo, work permit visa expiry alert, HR compliance document management, audited employee records, multi-company HR Odoo 18 Community, employee contract certificate tracking, EH HR Platform
Need this fitted to the way you work?
ERP Heritage delivers end to end Odoo work: Odoo Implementation, Customization and Development, Integration, Migration, Consultation, Support and Training. We help teams put this module into production, shape it to their process, and keep it running.
We work with businesses across Australia (Melbourne, Sydney, Brisbane, Perth, Adelaide, Canberra) and the Middle East (Dubai, Abu Dhabi, Riyadh, Jeddah, Doha, Kuwait City, Muscat). Start a conversation at erpheritage.com.au or email info@erpheritage.com.au.
Languages
Available in 19 languages
The interface ships translated out of the box. Switch language in Odoo and the fields, menus, and messages follow.
Please log in to comment on this module