Introducing a new way to review your PRs.

Read the announcement

frappe / hrms

Open Source HR and Payroll Software

View on GitHub

20 documents · Updated Nov 23, 2026

docs / workforce-management

Workforce management

Workforce management is the HR domain for managing people from hiring through exit. It keeps employee context at the center of work time, leave, talent, employee profiles, workplace requests, and employee-cost processes. The domain also turns these records into views for HR teams, managers, and employees.

Workforce domain

The employee is the shared point of reference across the domain. Each capability adds a different part of the employment story while keeping company, department, role, dates, and reporting links aligned.

CapabilityBusiness outcomeFurther reading
Employee lifecycleA current employment record from onboarding to separationEmployee lifecycle
Employee profiles and workplace requestsA useful employee profile with controlled requests for records, salary accounts, and workplace assetsEmployee profiles and workplace requests
Attendance and shiftsA record of planned and actual work timeAttendance and shift management
Leave administrationControlled leave policy, balance, request, and approval flowsLeave management
Recruitment and staffingA path from workforce demand to a new employeeRecruitment and staffing
Performance, skills, and learningA record of goals, reviews, skills, feedback, and trainingPerformance, skills, and learning
Employee expenses and travelA controlled path from planned employee spending to reimbursementEmployee expenses and travel

The capabilities share employee status and organization context. A change in that context can alter which work, leave, review, profile, or cost records are valid.

References: hrms/…/human_resource.json• L2-51 hrms/…/employee_profile.py• L47-87 hrms/…/organizational_chart.py• L214-227

Workforce flow

The workforce flow connects staffing demand to an employee record, then uses that record for daily work and long-term employment events. It is a set of linked business paths rather than a single one-way process.

This diagram shows how the employee record connects hiring, employment changes, work time, leave, development, employee profiles, workplace requests, and employee spending.

flowchart LR
    A[Staffing need] --> B[Recruitment]
    B --> C[Offer and appointment]
    C --> D[Employee record]
    D --> E[Onboarding and lifecycle]
    D --> F[Employee profile]
    F --> G[Documents and workplace requests]
    D --> H[Attendance and shifts]
    D --> I[Leave]
    D --> J[Performance and learning]
    D --> K[Expenses and travel]
    E --> L[Workforce views]
    F --> L
    G --> L
    H --> L
    I --> L
    J --> L
    K --> L

Staffing plans and job requisitions describe the need for people. Job openings and applicants support the selection process. A job offer carries the proposed role, joining date, leave and holiday context, compensation, and employment terms. An appointment letter presents that offer in a formal document, and onboarding turns the accepted offer into work that leads to an employee record. References: hrms/…/staffing_plan.json• L23-91, hrms/…/job_requisition.json• L38-209, hrms/…/job_opening.py• L65-159, hrms/…/job_offer.py• L84-184, hrms/…/appointment_letter.py• L57-132, hrms/…/employee_onboarding.json• L32-145

After joining, the same employee can change role or company, record work, take leave, complete training, maintain a profile, request workplace support, and claim work costs. Separation closes the employment path and brings unpaid pay, costs, leave-related amounts, advances, loans when available, and assets into the final settlement. References: hrms/…/employee_transfer.json• L24-113, hrms/…/employee_promotion.json• L25-120, hrms/…/employee_separation.json• L29-155, hrms/…/full_and_final_statement.py• L47-146, hrms/…/employee_profile.py• L248-284

Capability areas

Employee lifecycle

Employee lifecycle management keeps the employment relationship current from joining through exit. It uses onboarding, transfer, promotion, separation, and final settlement events to preserve the employee’s history and current state.

Onboarding tracks planned activities after an offer. Transfers and promotions record changes to the employee’s organization or role. Separation tracks exit work and its outcome. Final settlement brings open employee balances and assigned assets together before payment. The employee lifecycle page explains this area in detail.

References: hrms/…/employee_onboarding.json• L32-145 hrms/…/employee_transfer.json• L24-113 hrms/…/employee_promotion.json• L25-120 hrms/…/employee_separation.json• L29-155 hrms/…/full_and_final_statement.py• L72-146

Employee profiles and workplace requests

Employee profiles give each person a shared public identity and a private view of personal, employment, bank, document, and asset information. The profile also gives employees a controlled place to maintain allowed details and ask HR for changes or workplace assets.

The public profile supports directory information and employee-written sections. Private details are limited to the employee and permitted HR users. Employees can submit documents for review, request a salary-account change with proof, request or return an asset, and see the result. HR manages employment details, verifies documents, decides requests, and completes approved asset movements. The employee profiles and workplace requests page explains these boundaries and flows.

Document types define which employee documents are required and whether they need a number or expiry date. A document can be missing, pending, submitted, verified, or rejected. Employee requests remain open until HR decides them, and decision notices return the result and any rejection reason to the employee. References: hrms/…/employee_profile.py• L90-130, hrms/…/employee_profile.py• L224-284, hrms/…/employee_profile.py• L477-510, hrms/…/employee_document_type.json• L19-59, hrms/…/employee_document.json• L20-75, hrms/…/bank_details_change_request.py• L36-105, hrms/…/asset_request.py• L40-140, hrms/…/asset_request_decided.json• L9-31, hrms/…/bank_details_change_request_decided.json• L9-31

Attendance and shift management

Attendance and shift management describes when employees are expected to work and what work they record. Planned shifts, assignments, check-ins, attendance, attendance requests, and overtime provide related views of the same work period.

Check-ins can produce attendance after the actual shift window and any configured absence buffer are complete. The system uses active status, joining and relieving dates, assigned or default shifts, holidays, and work-hour thresholds to classify present, half-day, absent, late, and early-exit results. Employees and managers can request a shift change or correct attendance for a date range. Reports show daily status, shift hours, late entry, early exit, and unmarked days. The attendance and shift management page covers the time model.

References: hrms/…/employee_checkin.py• L1-20 hrms/…/attendance_request.py• L44-79 hrms/…/attendance_request.py• L216-318 hrms/…/shift_request.py• L41-95 hrms/…/shift_type.py• L83-162 hrms/…/shift_type.py• L164-252 hrms/…/shift_type.py• L287-321 hrms/…/shift_type.py• L323-450 hrms/…/test_shift_type.py• L33-153 hrms/…/test_shift_type.py• L238-375 hrms/…/test_shift_type.py• L435-699 hrms/…/test_shift_type.py• L740-829 hrms/…/test_shift_type.py• L916-1041 hrms/…/shift_attendance.py• L135-193 hrms/…/monthly_attendance_sheet.py• L38-78

Leave administration

Leave administration turns leave policy and holiday calendars into employee entitlement and absence records. It covers allocations, earned leave, applications, compensatory leave, adjustments, encashment, and the leave ledger.

Policy assignments define when an employee receives leave. Applications check the employee’s dates, balance, overlap, holiday rules, and existing attendance. Approval records the absence in attendance and in the leave history. Cancellation reverses those effects. Notifications keep people aware of pending approval, status changes, and cancellation. The leave management page explains the balance and approval rules.

References: hrms/…/leave_policy_assignment.py• L52-185 hrms/…/leave_allocation.py• L75-127 hrms/…/leave_application.py• L109-176 hrms/…/leave_application.py• L442-505 hrms/…/leave_application_pending_approval.json• L1-20 hrms/…/leave_application_status_update.json• L1-20 hrms/…/leave_application_cancelled.json• L1-20 hrms/…/employee_leave_balance.py• L87-142

Recruitment and staffing

Recruitment and staffing connects the need for people with a controlled hiring path. Staffing plans and requisitions set demand. Openings publish roles. Applicants, interviews, feedback, offers, and appointment letters move candidates toward joining.

The offer is the main bridge between selection and employment. It can carry the role, reporting line, joining date, leave and holiday terms, compensation break-up, probation, notice, working hours, and offer terms. HR can preview and send the offer to the applicant. A sent offer waits for the applicant’s response, and an accepted offer can support onboarding and employee creation. An appointment letter uses the offer and a letter template to present the agreed terms. The recruitment and staffing page describes the hiring path.

The hiring area also provides measures for openings, applicants, offers, acceptance, time to fill, and applicant status. These measures help HR compare demand with the progress of the hiring path. References: hrms/…/job_applicant.py• L67-160, hrms/…/job_applicant.py• L188-215, hrms/…/interview.py• L46-108, hrms/…/job_offer.py• L84-126, hrms/…/job_offer.js• L98-181, hrms/…/job_offer.py• L239-293, hrms/…/job_offer.py• L409-480, hrms/…/job_offer_component.json• L14-59, hrms/…/appointment_letter.py• L86-132, hrms/…/recruitment.json• L1-64

Employee referrals add an employee-sourced path into recruitment. A submitted pending referral can be rejected or turned into a job applicant. An accepted referral that qualifies for a bonus can create one Additional Salary record, which ties the referral reward to the referral outcome.

References: hrms/…/employee_referral.js• L4-29 hrms/…/employee_referral.js• L31-76

Performance and learning

Performance and learning supports employee growth after joining. Goals and appraisal cycles provide the review structure. Skills, feedback, training events, training feedback, and training results add evidence of progress and learning.

Goals can form a hierarchy for one employee within the same review context. Progress can roll up to a parent goal and into the appraisal score. An appraisal cycle selects its employee group and controls the review period. Training results close a training event for its participants, while training feedback records the employee’s view of the event. The performance, skills, and learning page explains these relationships.

References: hrms/…/goal.py• L46-162 hrms/…/appraisal_cycle.json• L37-128 hrms/…/appraisal.json• L48-146 hrms/…/employee_skill_map.json• L18-59 hrms/…/training_result.py• L30-60 hrms/…/training_feedback.json• L23-101

Employee expenses and travel

Employee expenses and travel manages planned and incurred work costs. Advances support planned spending. Travel requests describe a trip. Expense claims bring costs, taxes, advances, approval, and reimbursement into one employee-owned record.

An advance tracks what was paid, claimed, returned, and still open. It belongs to an active employee and uses a valid account in the advance currency. A claim can use an advance only for the same employee and currency, and only for its unclaimed amount. Claim scope also follows the employee’s company, while HR policy can block self-approval. Approval and payment update the claim’s remaining amount and its accounting record. Partial payment, payment reversal, and cancellation keep the claim status aligned with the amount still due. Advance returns can move through accounting or payroll deduction. Project and task links can carry approved cost into project views. Travel requests add itinerary, funding, identity, and cost details for work travel. The employee expenses and travel page covers this flow.

References: hrms/…/employee_advance.py• L61-180 hrms/…/employee_advance.py• L254-319 hrms/…/employee_advance.py• L323-452 hrms/…/test_employee_advance.py• L38-161 hrms/…/test_employee_advance.py• L163-274 hrms/…/test_employee_advance.py• L295-337 hrms/…/test_employee_advance.py• L413-535 hrms/…/expense_claim.py• L99-269 hrms/…/expense_claim.py• L271-421 hrms/…/expense_claim.py• L598-734 hrms/…/expense_claim.py• L761-867 hrms/…/travel_request.json• L43-227

Workforce views

Workforce views turn the domain’s records into working views for HR and managers. The HR dashboard summarizes headcount, hiring, exits, and organization breakdowns. The organizational chart provides a company directory and reporting view for allowed active employees, while the employee profile gives a person-focused view of public identity, private employee data, documents, assets, and requests. Attendance and leave reports answer time-based and balance-based questions, while recruitment and expense views show hiring and employee-cost activity.

The organizational chart supports two related ways to find people. The chart shows reporting links with expandable teams, search, manager navigation, company selection, layout choices, and image export. The directory groups active people by department and supports search, office and department filters, team and status signals, and links to public profiles. These views do not replace the source records. They depend on the employee’s company, organization links, employment dates, leave status, permissions, and related workflow state. Use the capability page that owns the business question first, then follow its source records into the related report, dashboard, profile, or directory view.

References: hrms/…/organizational_chart.py• L38-70 hrms/…/organizational_chart.py• L83-164 hrms/…/organizational_chart.vue• L39-57 hrms/…/organizational_chart.vue• L129-220 hrms/…/organizational_chart.vue• L273-330 hrms/…/ChartCanvas.vue• L47-139 hrms/…/DirectoryView.vue• L24-125 hrms/…/EmployeePopover.vue• L21-39 hrms/…/TreeNode.vue• L50-146 hrms/…/export_image.js• L10-59 hrms/…/employee_profile.py• L90-130 hrms/…/employee_profile.vue• L99-145 hrms/…/human_resource.json• L2-51 hrms/…/employee_lifecycle.json• L1-35 hrms/…/recruitment.json• L1-64 hrms/…/monthly_attendance_sheet.py• L106-186 hrms/…/employee_leave_balance.py• L31-84 hrms/…/recruitment_analytics.json• L1-27

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to employee company, department, role, manager, status, dates, or allowed profile fields can affect every capability that uses the employee as its context.
  • Changes to staffing demand, opening vacancies, applicant status, interview outcomes, offer status, or appointment-letter fields can break the handoff into onboarding and employee creation.
  • Changes to offer compensation, salary-structure inputs, leave allocations, holiday details, working hours, or employment terms can make the offer, appointment letter, and later employee records disagree.
  • Changes to offer status rules, applicant synchronization, applicant email handling, or employee creation can break the boundary between a sent offer, an accepted offer, and a new employee.
  • Changes to profile visibility, public sections, private field groups, request permissions, or masked sensitive values can expose data or block a valid employee action.
  • Changes to document types, required-document rules, verification states, or upload ownership can make employee records show the wrong compliance state.
  • Changes to bank-request approval, proof handling, account updates, or decision notifications can leave the employee profile and salary account out of step.
  • Changes to asset-request status, custodian checks, approval, asset movement, or decision notifications can leave an approved request without a matching handover or return.
  • Changes to shift timing, assignment overlap, check-in matching, attendance requests, holiday handling, absence buffers, or auto-attendance timing can change work-time results and overtime inputs.
  • Changes to leave policy periods, earned-leave limits, holiday assignment, approval, cancellation, or ledger rules can change both balances and attendance.
  • Changes to leave notification events or templates can leave employees and approvers unaware of a request state without changing the source record.
  • Changes to goal ownership, parent rules, appraisal-cycle filters, score inputs, training completion, or feedback access can change review results for the wrong employee group.
  • Changes to advance employee or currency matching, advance-account rules, return sources, claim approval, payment updates, reimbursement status, or accounting links can leave HR cost records and finance records out of step.
  • Changes to self-claim and self-approval rules can let an employee create or approve a claim for the wrong person or approve their own cost.
  • Changes to referral status, applicant creation, bonus eligibility, or existing bonus detection can create a missing applicant or duplicate referral payment.
  • Changes to organizational-chart access, active-employee filters, manager links, leave status, directory filters, or profile links can expose the wrong people or show the wrong directory state.
  • Changes to chart loading, team expansion, company switching, search results, layout state, or image export can make the reporting view stale, incomplete, or hard to use without changing employee records.
  • Changes to report status mapping, holiday resolution, or report filters can make workforce summaries disagree with source attendance or leave records.

Important failure modes

TriggerConsequenceGuard
An offer is accepted without a valid staffing need or vacancyHiring counts and the employee handoff can disagreeKeep requisition, opening, offer, and employee links traceable through the hiring path
Offer terms and appointment-letter data use different role, shift, or compensation contextThe formal letter can state terms that do not match the offerTreat the job offer as the source for appointment terms and review the rendered letter before sending
A sent offer is not addressed to the applicant or its response state is changed out of sequenceThe offer can remain in the wrong response stateKeep the applicant address and status transition tied to the offer communication
Required onboarding work is incompleteEmployee creation is delayed or incompleteUse onboarding status and activities as the gate before creating the employee
A profile exposes private employee data to a user who can only see the directoryPersonal, bank, document, or asset data can reach the wrong personSeparate public profile access from Employee-record permission before loading private data
An employee tries to approve their own bank or asset requestA requester can decide their own sensitive changeRequire HR submit permission and reject self-review
An employee uploads a document that HR has not checkedThe record can appear compliant before reviewKeep employee uploads in Submitted state until HR verifies them
A required document type is renamed or its flags change after employee records existRequired, numbered, or expiring documents can be shown with the wrong meaningPreserve document-type links and review required-document rules with existing records
A bank change is approved without valid proof or the employee update failsSalary can continue to use the old account or show a false changeKeep proof with the request and update the Employee record only on approval
An asset request is approved without a submitted Asset MovementThe request looks complete while the employee still lacks or holds the assetTreat the movement as the handover or return step after request approval
A shift request or attendance request overlaps an existing requestThe requested work record is rejected or can target the wrong periodCheck employee, dates, shift, and approver before submission
Attendance is processed before the actual shift end or absence bufferPresent, absent, overtime, and late or early results can be wrongProcess attendance only after the shift and its sync window are complete
A leave approval is changed without its attendance or ledger effectLeave balance and attendance can disagreeReverse changes through the linked leave workflow
A goal parent belongs to another employee, KRA, or appraisal cycleGoal progress cannot roll up as intendedKeep parent and child goals in the same review context
A training result is recorded for an unsubmitted eventTraining completion cannot be recordedComplete and submit the training event before recording its result
A pending referral is neither rejected nor turned into an applicantThe recruitment path can lose the employee-sourced candidateKeep referral status actions tied to applicant creation
An accepted referral creates more than one bonus salary recordThe referrer can receive duplicate paymentCheck referral bonus eligibility and existing submitted salary records before creating the bonus
An advance is linked to a claim for another employee or currencyThe claim cannot use the advance and the balance can remain openMatch employee, currency, account, and outstanding amount before approval
A claim is marked paid without a matching payment or journal recordThe employee or finance view can show a false paid stateReconcile approval, reimbursement, payment, and accounting records together
An employee creates or approves a claim for another employee, or approves their own claim when blockedA cost can be assigned to the wrong person or bypass independent reviewEnforce employee scope, approver identity, and the self-approval setting
A return is built from caller-supplied employee, company, currency, or account valuesThe return can post outside the source advance’s employee or company contextBuild the return from the stored advance and validate the selected bank or cash account
A company switch or late chart response is applied after the user selects another companyThe chart or directory can show people from the wrong companyDiscard stale loads and clear chart state when the company changes
A manager is inactive or outside the selected companyThe employee can lose a visible reporting link even though the source link existsTreat external managers as links only and load chart cards from the selected company’s active employees
A large chart is exported without enough browser canvas spaceThe image can fail or become unreadableLimit export dimensions and retry with fewer teams open when needed

Key files

FileWhy to read it
hrms/…/human_resource.jsonShows the high-level workforce measures for headcount, hiring, exits, and organization breakdowns.
hrms/…/organizational_chart.pyShows the allowed-company directory and reporting view built from active employees.
hrms/…/organizational_chart.vueShows how company context, chart and directory views, search, team loading, and export actions are coordinated.
hrms/…/DirectoryView.vueShows the employee directory’s search, filters, team signals, and profile links.
hrms/…/ChartCanvas.vueShows the chart’s pan, zoom, selection, and view framing behavior.
hrms/…/EmployeePopover.vueShows the employee summary, manager link, profile action, email action, and team action.
hrms/…/TreeNode.vueShows how reporting relationships become expandable tree or column views.
hrms/…/export_image.jsShows how the visible chart becomes a downloadable image.
hrms/…/employee_profile.pyShows how public and private employee information, document records, and workplace requests are exposed and controlled.
hrms/…/employee_profile.vueShows the employee-facing profile, its private sections, and the links between profile actions and HR workflows.
hrms/…/employee_document_type.jsonShows how HR defines required employee documents and their number or expiry rules.
hrms/…/employee_document.jsonShows the document status and evidence held on an employee record.
hrms/…/bank_details_change_request.pyShows how a salary-account change moves from employee request to HR approval and Employee update.
hrms/…/asset_request.pyShows how an employee asset issue or return request connects to approval and Asset Movement.
hrms/…/job_offer.pyShows the bridge between a selected applicant, employment terms, compensation, leave context, and employee creation.
hrms/…/job_offer.jsShows how HR previews, emails, and moves through the offer-to-employee actions.
hrms/…/job_offer.jsonShows the business fields and states that define an offer’s role, terms, compensation, work time, leave, and print view.
hrms/…/employee_referral.jsShows how a pending referral becomes a job applicant and how an accepted referral bonus is created once.
hrms/…/appointment_letter.pyShows how an offer becomes a formal appointment document.
hrms/…/employee_onboarding.jsonShows the handoff from an accepted offer to onboarding work and employee context.
hrms/…/attendance_request.pyShows how a work-time correction becomes attendance across a date range.
hrms/…/shift_request.pyShows how an approved employee shift change becomes a shift assignment.
hrms/…/shift_type.pyShows how shift windows, check-ins, holidays, work-hour thresholds, and absence buffers become attendance results.
hrms/…/leave_application.pyShows how leave approval connects dates, attendance, and the leave ledger.
hrms/…/employee_leave_balance.pyShows the balance view built from allocation, expiry, carry-forward, and leave history.
hrms/…/goal.pyShows the relationship between goal hierarchy, progress, employee access, and appraisal scores.
hrms/…/appraisal_cycle.jsonShows how a review period selects its employee group and controls its state.
hrms/…/training_result.pyShows how a completed training event updates participant completion.
hrms/…/employee_advance.pyShows how planned employee spending moves through payment, claim, return, and recovery states.
hrms/…/test_employee_advance.pyShows the advance lifecycle across partial payment, claims, returns, payroll recovery, cancellation, and multiple currencies.
hrms/…/expense_claim.pyShows how an employee claim connects approval, advances, reimbursement, projects, and accounting.
hrms/…/travel_request.jsonShows how work travel records employee, itinerary, funding, identity, and cost context.
hrms/…/full_and_final_statement.pyShows how employee exit balances and assets become a final settlement.