HR Payroll Links
Loans, advances, overtime and gratuity reach the payslip, once.
Why this module
HR Payroll Links
Requests that actually get paid
An approved loan, advance, overtime entry or gratuity does nothing for the employee until it lands on a payslip. This module collects each one for the right employee and period and writes it as an input line the salary structure can price, so the amount flows through gross, deductions and net.
Marked processed on payment
When the payslip is paid, the loan instalment is set paid, the advance is flagged recovered, and the overtime and gratuity records are marked processed. The next payslip for the same employee and period sees nothing left to feed, so a recovery never doubles up.
The structure decides treatment
Inputs carry stable codes (LOAN, ADVANCE, OT_HOURS, GRATUITY). Your salary rules read inputs.CODE to add or deduct, and overtime arrives as a quantity of hours so a rule applies your own hourly rate. No hard-coded pay logic lives in the bridge.
Day in the life
Run the January pay
You compute a payslip. The bridge looks at the employee and the date window and pulls in a 200 loan instalment due on the 15th, a 300 advance set to recover in January, ten approved paid overtime hours, and an approved gratuity. Each becomes an input line; your structure rules turn them into a loan deduction, an advance deduction, an overtime allowance and a gratuity allowance. You confirm and pay. The instalment is marked paid, the advance recovered, the overtime and gratuity marked processed. Run the same period again and the slip feeds nothing new.
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.
Auto inputs are deleted and rebuilt on every compute, so recomputing a slip never duplicates a loan, advance, overtime or gratuity line.
Source records are flagged processed only when the slip is actually paid, never on draft compute, so an unpaid or cancelled draft leaves the loan, advance and gratuity available for the real run.
Once paid, the instalment, advance, overtime and gratuity are marked done; a fresh payslip for the same employee and period feeds nothing, verified by a regression test.
Only auto-generated inputs are rebuilt. Input lines you enter by hand on the payslip are left untouched across every recompute.
Each feeder matches on its own date inside the slip's from/to window: loan due_date, advance recover month, overtime work date, gratuity computation date. Records outside the window are not pulled.
Overtime is fed as a quantity of compensated hours with a zero amount, so the salary rule, not the bridge, applies the employee's rate and multiplier policy.
Only paid advances, done paid-compensation overtime, and approved gratuities are eligible, so requests still in draft or pending approval never slip into pay early.
What is inside
Built to do the job, end to end.
- Four feeders, one hook. A single override of the payslip's auto-input collector appends loan, advance, overtime and gratuity input dicts. The base payroll engine rebuilds these on each compute and leaves manual inputs alone.
- Processed markers. Three boolean flags (payslip-processed on overtime and gratuity, recovered on salary advance) plus the existing loan-line paid flag. All are copy-false and read-only, so duplicating a record or hand-editing the form will not silently reopen a settled item.
- Stable input codes. LOAN and ADVANCE arrive as amounts for deduction rules; OT_HOURS arrives as an hours quantity; GRATUITY arrives as an amount. Your salary structure references each by code, keeping pay logic in the rules where you can audit it.
- Pay-time settlement. On payment the bridge re-runs the same period queries and writes the processed and paid markers in one pass per source, so settlement matches exactly what the slip fed.
- Tested end to end. Shipped tests drive a real structure from compute through pay, asserting the four amounts reach gross, deductions and net, that recompute does not duplicate, that manual inputs survive, and that a second slip feeds nothing.
Honest about the edges
What this does not do, so nothing surprises you.
- This is a connector, not an application. It installs no menus, views, wizards or reports of its own; you work in the standard payslip form. It hard-depends on the ERP Heritage payroll, loan, overtime, gratuity and salary advance modules and does nothing without them.
- It feeds whole amounts as the source records report them. It does not prorate a loan instalment, advance or gratuity across partial periods, and it does no currency conversion; amounts and the hourly rate are handled by your salary rules.
- Settlement happens at payment, not at confirm. A paid slip that is later reversed does not automatically reopen the loan instalment, advance or gratuity flags; reversing a settled period is a manual correction.
- There is no scheduled job, advisory lock or approval ladder in this module. Eligibility gating relies on the source records' own states (paid advance, done overtime, approved gratuity), and period matching uses each feeder's own date field.
Odoo 19 payroll integration, loan deduction in payslip, salary advance recovery payroll, overtime to payslip Odoo, end of service gratuity payout, payslip input lines, salary structure rules Odoo, idempotent payroll feed, HR payroll bridge Community, no double deduction payroll, Odoo Community HR payroll, feed loan instalment payslip
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