Human Resources
Core HR management — departments, positions, employees, leave, attendance, skills, training, and documents
v0.1.4 · 82 installs · free
What it does
hr keeps the people side of a company in one place: the org structure, employee records, time off, daily attendance, skills and training. HR staff get a single employee card with the whole history behind it. Team leads approve leave without touching the rest of the data.
It stands on its own and has no business-module prerequisites. Other modules can reference its employees.
Highlights
- Org structure - departments form a tree with a department manager, positions belong to a department and carry a salary range. An Org Tree view shows the hierarchy.
- Employee master record - personal and contact data, employment status (Active, On Leave, Suspended, Terminated), hire and termination dates, salary with currency and pay frequency, emergency contact. Years of service and full name are calculated.
- Reporting lines - each employee has a direct Manager and a separate HR Manager. A Management Tree view shows who reports to whom, and the card lists Direct Reports with their count. Nobody can be their own manager.
- Leave with approval - requests are Pending, Approved, Rejected or Cancelled. Approve, Reject and Cancel are actions on the request; Reject and Cancel ask for a reason, which is appended to the request notes.
- Attendance - daily clock-in and clock-out with calculated hours, status (Present or Absent) and work mode (Office or Remote), plus a weekly matrix view.
- Skills and training - a skill catalog, employee skills with proficiency (Beginner to Expert), training courses and enrollments with status and score.
- Employee documents - contracts, ID copies, certificates and reviews attached to an employee, with issue and expiry dates.
- Full audit history - changes to HR records are tracked.
Data model
Demo data
Install with demo data to get a small sample company: 10 departments, 12 positions, 12 employees, and 10 skills and 10 trainings, with leave requests, attendance, employee skills, enrollments and documents (12 each).
How it fits
HR is self-contained: departments, people and their records live here, with no other module required. It is part of erp-pack, the starter ERP.
Used by
Published modules that build on this one.
- ERP SuitepackSales, finance, warehouse, HR — installed and wired together as a starter ERP.
What's inside
The module's own entities, views, reports, print templates and actions.
Entities 10
departmentpositionemployeeleave_requestattendanceskillemployee_skilltrainingenrollmentemp_documentViews 20
Print templates 2
Actions 3
Roles
Shipped with the module and assignable the moment it installs.
- HR Administrator
hr.admin— full access to all HR entities - HR Manager
hr.manager— manage employees, leave, attendance, and training - Team Lead
hr.team-lead— view employees, approve leave, manage attendance - HR Viewer
hr.viewer— read-only access to all HR data
Settings
Configurable per workspace, under Admin.
| Setting | Type | Default |
|---|---|---|
default_currencyDefault currency code for salaries and salary bands | text | USD |
0.1.3Dec 1, 2026
HR dashboard
For users
The HR folder now opens with a dashboard: active and on-leave headcount, pending leave requests, trainings in progress, employees by department and status, leave requests by type and enrollments by status. Edit it to make it your own.
For developers
ui/dashboards.json: the default dashboard (8 tiles on the module's root folder).translations/: dropdown option labels (statuses, types, priorities) in de, so charts and grids show them in the user's language.version→0.1.3.
0.1.2Nov 6, 2026
HR Manager on printed profiles, direct manager on employees
For users
The HR Manager on an employee card now selects another employee. The printed Employee Profile shows that employee’s name. When no HR Manager is assigned, the line is omitted.
An employee now also has a Manager (direct line manager), shown on the card and in the employee list. A Management Tree view under Organization shows who reports to whom. The card also has a Direct Reports tab listing the employees who report to that person. An employee cannot be their own Manager or their own HR Manager.
For admins
Assign an HR Manager employee on existing records where needed; there is no reliable automatic match between system users and employees. The obsolete user-based owner field is no longer exposed.
For developers
- Added a nullable
employee.hr_manager_idreference toemployee.employee_idand exposed itshr_managerlookup on the default card layout. This assignment is not a reporting hierarchy. - Added a nullable
employee.manager_idreference toemployee.employee_id(managerlookup) for the direct line manager, on the card and in theemployeesview. Not used for approvals yet. - Added the
direct_reportsset onemployee(employees whosemanager_idis this employee), as a card tab. - Added
employee.direct_reports_count(G,COUNT([direct_reports].[employee_id])), the number of direct reports, on the card. - Added the
management_treedata view (tree-grid bymanager) and its menu entry under Organization. - Added check constraints
chk_manager_not_selfandchk_hr_manager_not_self, so neithermanager_idnorhr_manager_idmay equalemployee_id; messages translated (en-US, de-DE). - The print template uses the
hr_managerreference value instead of the nonexistentownervariable. - Removed the obsolete
employee.owner_idfield and its user FK from module metadata. On upgrade, the installer retains the physical column and any existing values as an orphan for operator-controlled cleanup. The module version is0.1.2; the database schema version is0.1.1.
0.1.1Nov 4, 2026
Action descriptions translated
For users
The descriptions of the module's actions are now translated into German, so an action button's tooltip no longer shows in English.
For developers
translations/de-DE.json:descfor 3 actions (#1548).version→0.1.1.
0.1.0Oct 8, 2026
Salaries carry a currency
For users
Employees and positions have a Currency field. The salary and the salary band show that currency: an employee paid in EUR shows €, not $. A new record starts with the Default Currency setting and you can change it on the record.
The currency column is hidden in the grids by default — the amounts beside it already carry the symbol.
For admins
- Existing employees and positions get
USD. The Default Currency setting is created by this upgrade withUSDas its value, so that is what every existing record receives. Salaries paid in another currency have to be corrected afterwards, one by one. - Set Default Currency now so that records created from here on start in the right currency.
- The setting is one value for the whole module. An organisation paying in several currencies sets the majority currency here and corrects the rest on the record — there is no per-country or per-legal-entity currency.
- Amounts are not converted. A total over records in different currencies shows no symbol — that is deliberate, not a missing format.
For developers
- New required
currencycolumn (varchar(3)) onemployeeandposition. The standard record editor prefills it from$[default_currency]; programmatic inserts must provide it explicitly. The value is stored on the record, so changing the setting later leaves existing rows untouched — the upgrade backfills existing records separately with the setting's value. salary,min_salary,max_salaryand the derivedsalary_rangecarry"params": { "currencyColumn": "currency" }.salary_rangepreviously formatted with no symbol at all.- The currency list lives once in the local
hr.currencydomain. Both currency columns and thedefault_currencysetting bind to it. - Data views carry
currencyas a hidden column. It has to be in the dataset, not merely absent from display —currencyColumnresolves the code from the record.
0.0.11Aug 19, 2026
Leave requests get Approve / Reject / Cancel buttons, and a change history
For users
A leave request is now decided with a button — Approve, Reject or Cancel — and the Status field is no longer typed in by hand. Each button knows when it applies: Approve and Reject only offer themselves on a Pending request, and Cancel on anything not already cancelled or rejected, so the states that make no sense (approving twice, rejecting something already cancelled) simply aren't offered.
The Leave Board still groups requests by state, but cards no longer move by dragging — open the card and press the button. That is what makes the rules above hold: a drag wrote the status straight to the database and skipped every check.
Reject and Cancel ask for a reason and append it to Notes, so the record says why and not only what. Existing notes are kept — the reason goes on a new line beneath them.
The buttons are a right, not just a convenience: Approve / Reject / Cancel are granted to HR Administrator, HR Manager and Team Lead, and withheld from HR Viewer.
Approved By and Approved Date are gone from the leave request form and the Leave Requests list. They never filled in — approving a request by picking Approved in the Status dropdown left both empty — and even when filled they answered the wrong question: a request that is approved in June and cancelled in July still shows an approval date and has nowhere to say who cancelled it, or who rejected it.
The lifecycle is now recorded properly instead. Every HR record keeps a History panel, opened from the record toolbar, showing each change with the old value, the new value, who made it and when. For a leave request that reads as the actual story:
Status: Pending → Approved— Maria Schmidt, 14 June 2026 09:12Status: Approved → Cancelled— Tom Weber, 2 July 2026 16:40
This works no matter how the change was made — the Status dropdown on the form, a drag on the Leave Board, or an API call — so nothing can quietly slip past it.
Leave requests also gain Created By and Last Updated By alongside the existing Created Date and Last Updated.
The printed Leave Request Form's Approval section now shows Status only. It previously tried to print an approver name and approval date; the name never rendered at all (it referenced a field that does not exist on the entity) and the date was always blank.
For admins
- New
ui/actions.jsonwithapprove_leave/reject_leave/cancel_leave, DSL inlogic/actions/, allexecutionMode: "single"andisTransacted: true.hrhad nologic/directory before this release. - Each action's
canExecuteis the whole guard — noerror()repeated insideexecute:. The platform now evaluatescanExecuteserver-side before running an action (ActionMethods.EnsureCanExecuteAsync), so approving an already-rejected request through a directaction.executeis refused withACTION_EXECUTION_FAILrather than succeeding. action:approve_leave/action:reject_leave/action:cancel_leavegrantedEtohr.admin,hr.managerandhr.team-lead.hr.viewergets none.statusdrops theEflag (VEM→VM), so the actions are the only way to move a leave request between states. This is Step 2 of the state machine pattern. Theformula: "'Pending'"default still sets the initial state on insert, and the DSL writes the column server-side regardless of the flag.- The Leave Board stays usable.
KanbanViewgatesdraggableonrecord.canEdit(<group column>), so a locked status column yields a clean view-only board instead of a drag that optimistically moves and snaps back on rejection. Swimlanes still group by state; the transition happens by opening the card and pressing the button. hr.leave_requestdropsapproved_by_id,approved_date, and theFK_Leave_ApprovedByreference. Its trait moves fromaudittoaudit-full, addingcreated_by,created_by_user,last_updated_by,last_updated_by_userand the two FKs todForge.user.- The manifest declares
"auditHistory": "full", matchingfin,pmandua-accounting. This is module-wide —ModulePackagepropagates the manifest value to every entity, and the entity JSON schema has no per-entityauditHistoryproperty to narrow it. Everyhrentity therefore starts writingaudit.change_log/audit.change_detailrows,attendanceincluded; the weekly attendance grid is the highest-volume writer in the module and is worth watching after the upgrade. approved_by_idremoved from theleave_requestsgrid columns. Both field labels dropped fromen-US/de-DE, replaced with labels for the two newaudit-fulllookups.
Upgrade note — the two columns are not dropped
Removing a column from a manifest does not drop it. RelaxOrphanColumnsBeforeSeedAsync clears its NOT NULL and any dependent FK/CHECK/UNIQUE constraints and leaves the column and its data in the table, surfaced as an orphan-column warning. Existing approved_by_id / approved_date values survive the upgrade and stay readable in SQL. Actually dropping them is a separate, operator-confirmed step:
dforge module install --code <tenant> --path modules/hr --drop-removed-columns
Take a copy first if the historical values matter — audit history is only recorded from this version forward, so it does not backfill who approved the requests approved before the upgrade.
audit-full adds two NOT NULL user columns to a populated table. This is safe: SchemaDdlGenerator detects a serverDefault: currentUser() column that cannot be tightened inline, adds it with the constant system-user sentinel (user_id = 0, seeded by tenant-schema.sql) so Postgres treats it as a catalog-only change with no table rewrite, then repoints the default to the session expression. Pre-existing leave requests will read back Created By = System.
Known limitation — history is not queryable
audit.change_log lives in the audit schema, not as an entity. It is reachable through the History panel and the audit.getHistory / audit.getFieldHistory API methods, and nowhere else — you cannot filter a grid by "approved in July", drive a report off approval turnaround, or reference it from a formula. If HR asks for any of that, approved_date comes back as a real column with an action or trigger stamping it, and this release's decision gets revisited.
0.0.9Aug 10, 2026
Attendance records are constrained to a single day, and Work Mode splits out of Status
For users
An attendance record now describes one day of one employee, and the platform enforces it:
- Clock Out must be later than Clock In.
- A record cannot span more than 16 hours, so a clock-in in one month can no longer be paired with a clock-out in another.
- A day marked Absent cannot carry clock times — an absence means no hours were worked.
Status is now just Present or Absent. The old Late, Half-Day and Remote values described three different things at once, which made combinations like "Remote and Late" impossible to record:
- Late and Half-Day are visible from the clock times themselves — a 09:10 Clock In or a 4.00 Total Hours says it without a separate label.
- Remote was never a status at all; it moved to the new Work Mode field (Office / Remote), which can now be combined freely with either status.
Existing records are migrated: Late and Half-Day become Present / Office, and Remote becomes Present / Remote.
A new Weekly Attendance view (Time & Attendance menu) shows one row per active employee and one column per day of the week, with clock in / clock out / total hours editable directly in the cell — so a week can be filled in without opening a record per day. Empty cells create the attendance record on first entry.
Clock In and Clock Out now ask for a time, not a date and time. The day is already fixed by the record's own Date, so typing it again in every cell was busywork — and in the weekly grid the date box barely fit. The stored value is unchanged; only what you type is shorter.
For admins
hr.attendancegains three CHECK constraints —CHK_attendance_clock_order,CHK_attendance_shift_span(16 hours), andCHK_attendance_absent_no_clock.CHK_attendance_shift_spandeclares an explicitfields: ["clock_in", "clock_out"]. The client maps a server constraint violation onto specific fields by readingconstraint.fieldsfirst and only falling back to parsing the SQL expression;INTERVAL '16 hours'is outside the client parser's grammar, so without the explicit list the violation would surface as an unattached entity-level error (rendered as a second, redundant banner) instead of marking the two clock fields.- New
work_modecolumn (varchar(30), dropdown, nullable). Added to the Attendance Records data view and translated inen-US/de-DE. statusdropdown options narrowed toPresent/Absentand converted to the object form with badge colors, matchingleave_request.status.- New
attendance_weekdata view (viewType: "matrix"):employeerow axis filtered toemployment_status = 'Active', adate/day/weekcolumn axis, andattendanceas the editable cell entity keyed on(employee_id, attendance_date).cardinality: "one"lines up exactly withUQ_employee_attendance_date, so the view cannot express a state the table rejects. NeedsemployeeSelect plusattendanceInsert/Update — every shipped hr role already has both. clock_in/clock_outswitch tofieldTypeCd: "time"while keepingdbDatatype: "timestamptz", plusparams.dateColumn: "attendance_date". Storage, thetotal_hoursformula and every existing row are untouched — only the editor changes. The installer's storage-vs-display check permits the pairing becausetimestamptzandtimeshare thetemporalcoercion group.params.dateColumnis what tells the editor which day to write the clock back onto when the field starts empty, as it does in a freshly-created matrix cell; without it a bare"09:15"would reach a timestamp column.- All 14 constraint messages across the module are now translated (
en-US+de-DE), via theentities.<entity>.constraints.<name>.messagesection of the module translation files — previously the DB-level violation text was English-only in every locale. Thestatusandwork_modeoption labels are localized the same way.
Upgrade note — pre-existing data
ALTER TABLE … ADD CONSTRAINT CHECK validates existing rows, and the installer's DDL only swallows duplicate_table / duplicate_object. A tenant already holding a row that violates any of the three checks will fail the upgrade rather than skip the constraint. Audit before upgrading:
SELECT attendance_id, employee_id, attendance_date, clock_in, clock_out, status
FROM hr.attendance
WHERE (clock_in IS NOT NULL AND clock_out IS NOT NULL
AND (clock_out <= clock_in OR clock_out - clock_in > INTERVAL '16 hours'))
OR (status = 'Absent' AND (clock_in IS NOT NULL OR clock_out IS NOT NULL));
Rows still carrying the retired Late / Half-Day / Remote status values are not rejected by the database (the dropdown is a varchar, not an enum), but they will render without a matching option until remapped:
UPDATE hr.attendance SET status = 'Present', work_mode = 'Office' WHERE status IN ('Late', 'Half-Day');
UPDATE hr.attendance SET status = 'Present', work_mode = 'Remote' WHERE status = 'Remote';
UPDATE hr.attendance SET work_mode = 'Office' WHERE work_mode IS NULL AND status = 'Present';
Known limitation — clock columns remain timestamptz
Anchoring the clock times to attendance_date (clock_in::date = attendance_date) is deliberately not part of this release. Such a constraint is creatable against a timestamptz column, but its result depends on the writing session's TimeZone: the same instant passes under UTC and fails under Europe/Kyiv. Making it deterministic requires storing wall-clock timestamp instead — and the module installer only emits ADD COLUMN IF NOT EXISTS, with no ALTER COLUMN … TYPE, so a type change would silently no-op on every existing tenant while quietly changing behavior on fresh ones.
CHK_attendance_shift_span closes the practical hole (cross-month pairs) without depending on the session zone. The type change is left for a release that can carry a real column-type migration.
Browse the full
module catalog.
Every module is metadata — install it in one click, then change anything.