feat(Absence Plan): implement DocType + functionality (addition to Leave Application) (DRC-148)#48
Merged
PatrickDEissler merged 26 commits intoversion-15from Feb 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements an "Absence Plan" DocType as an addition to the Leave Application system for managing planned employee absences that don't consume leave allocation. The feature integrates with the Time Capture and Attendance modules to automatically create attendance records for planned absence dates.
Changes:
- Introduces Absence Plan and Absence Plan Date DocTypes with approval workflow
- Adds automatic attendance creation for approved absence plans
- Updates attendance metrics calculation to support absence plans alongside leave applications
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| absence_plan.py | Core business logic including validation, duplicate prevention, notifications, and bulk date insertion |
| absence_plan.json | Main DocType definition with fields for employee, leave type, dates, and approval workflow |
| absence_plan.js | Client-side form logic with bulk insert dialog and delete future dates button |
| absence_plan_list.js | List view indicator configuration for different statuses |
| absence_plan_date.py | Child table document class (currently empty stub) |
| absence_plan_date.json | Child table definition with date, weekday, and reason fields |
| time_capture.py | Integration logic to create attendance records from approved absence plans |
| attendance.py | Updated metrics calculation to handle absence plan leave types |
| custom_fields.py | Adds custom fields to Attendance for linking to absence plans |
| patches.txt | Migration patch timestamp update |
| locale files | Translation strings for German and English |
| test_absence_plan.py | Empty test class placeholder |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
time_capture/time_capture/doctype/absence_plan_date/absence_plan_date.json
Outdated
Show resolved
Hide resolved
time_capture/time_capture/doctype/absence_plan_date/absence_plan_date.py
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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.
Documentation:
https://github.com/alyf-de/time_capture/wiki/6)-Urlaube-&-andere-Abwesenheiten#absence-plan-abwesenheitsplan
Use cases:
TODO: