Repository navigation
feat(hr): Oman leave types and TSI Salary Slip print format - #3
Merged
Merged
Conversation
Leave types (Royal Decree 53/2023): annual, four sick-pay tiers (100/75/50/35%, 182 days), maternity, paternity, marriage, bereavement, iddah, hajj, patient companion, exam, unpaid childcare. Seeded by a patch and after_install, create-only, so HR edits on the live site are never overwritten by a migrate. TSI Salary Slip print format: earnings (full month vs this month) on the left; attendance, leave taken by type and deductions on the right; summary showing how net pay is reached. Leave taken is rebuilt from approved Leave Applications clipped to the slip period, exposed to Jinja as get_leave_taken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
TSI Oman asked for leave types matching their policy and a payslip that shows how salary is calculated: earnings on one side; attendance, leave and deductions on the other; a clear net salary summary.
What
Oman leave types (
oman_leave.py, Royal Decree 53/2023)create_oman_leave_typesandafter_install. Create-only: an existing Leave Type is never touched, so a migrate cannot overwrite what HR changes on the live site. Not shipped as fixtures for that reason.TSI Salary Slip print format (
tsi/print_format/tsi_salary_slip/)payslip.get_leave_taken(Jinja method): approved Leave Applications clipped to the slip period, so leave spanning two months is split correctly.Testing
bench --site tsi.local run-tests --module tsi_custom.tests.test_payslip: 7 passedNot covered / for review
Deploy
bench --site <site> migrate(runs the patch, syncs the print format). Then set "TSI Salary Slip" as default print format for Salary Slip if wanted.🤖 Generated with Claude Code