| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Employees (hr)
• Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 1357 |
| Technical Name |
eh_hr_insurance |
| License | LGPL-3 |
| Website | https://erpheritage.com.au |
| Versions | 16.0 17.0 18.0 19.0 |
EH HR Insurance
Track employee insurance policies, beneficiaries, and expiry through a configurable workflow with a tamper-evident audit trail.
Why this module
EH HR Insurance
Workflow and audit you do not maintain
States and transitions are read from the HR Platform workflow definition, so the lifecycle can be reconfigured without touching code. The module owns no engine logic of its own.
Every change is provable
Create, write, and delete events land in an append-only audit log chained with SHA-256 and serialized by a Postgres advisory lock, so a silent edit breaks the chain and shows up on verification.
Companies stay separated
Records are company-scoped on create and cross-company writes are refused unless an explicit audited override is set, so one company never sees or edits another's policies by accident.
Day in the life
From new policy to renewal reminder
An HR officer opens a new insurance record for an employee, picks the provider and cover type, sets the coverage amount, premium, and validity dates, and adds beneficiaries with their shares. Saving auto-numbers the policy and starts it in Draft. Activating moves it to Active under an officer-gated transition, and the change is tracked in chatter and the audit log. As the end date approaches, the record shows a days-to-expiry countdown and flags itself when cover ends within 30 days, so the team can renew or expire it before it lapses. When cover ends, an officer expires the policy into a final state that blocks any further edits to its lifecycle.
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.
Expired and cancelled are marked final in the workflow definition, so the engine refuses any further transition out of them even if a misconfigured transition is declared from that state.
Activate, expire, and cancel are each restricted to the HR officer group; a user outside the allowed groups is blocked with a clear error unless they are the system administrator.
Each audit row hashes the previous row's hash plus its own fields under a Postgres advisory lock, so appends are strictly ordered and any later edit to a row fails chain verification.
Changing a record's company is rejected unless an explicit allow_cross_company context is set, and when allowed the elevation is written to the audit log with every affected record id.
Writes only emit an audit event when an audited field actually changes value, so no-op writes and untracked fields do not pollute the trail.
A database CHECK constraint holds each beneficiary share between 0 and 100 percent, and deleting a policy cascades to remove its beneficiaries cleanly.
What is inside
Built to do the job, end to end.
- Two models. eh.hr.insurance holds the policy with provider, policy number, cover type, coverage amount, premium and frequency, and validity dates. eh.hr.insurance.beneficiary holds each named beneficiary, relationship, payout share, and contact, ordered by a drag handle and cascade-deleted with the policy.
- Computed expiry view. days_to_expiry and is_expiring_soon are computed from the end date, with the soon flag set when cover ends within the next 30 days. total_share sums beneficiary shares and is stored so it stays current as beneficiaries change.
- Engine dependencies. Built on eh_hr_core, eh_hr_compat, and eh_hr_engine_workflow plus standard hr. The workflow, audit, and company-scope behaviour come from shared platform mixins, so this module stays small and consistent with the rest of the suite.
- Access and references. Role-based access for HR admin, manager, and self-service employee groups, with self-service read-only. Policy references are auto-generated from an INS year-prefixed sequence on save, and the record carries chatter with field-level change tracking.
Honest about the edges
What this does not do, so nothing surprises you.
- Tracks insurance policies as records; it does not calculate, post, or deduct premiums in payroll or accounting.
- Expiry shows a days-to-expiry countdown and a 30-day flag on the record, but there is no scheduled job or email reminder; the flag is computed on read and is not stored or searchable.
- Provides no claims tracking, document storage beyond standard chatter attachments, or provider integration.
- Beneficiary shares are constrained to 0 to 100 each, but the module does not enforce that the total adds up to exactly 100 percent.
- Workflow transitions are gated to the HR officer group out of the box; finer-grained or multi-step approval routing is configured through the shared engine, not this module.
- Built for Odoo 17 Community and depends on the EH HR Platform modules; it is not a standalone install.
employee insurance Odoo 17, HR insurance management, insurance policy tracking, employee benefits HR, beneficiary management, health life dental cover, policy expiry tracking, HR workflow engine, multi-company HR Odoo, audit trail HR records, Odoo 17 Community HR, employee insurance register
Please log in to comment on this module