Update: I'm willing to sponsor a bounty to get this working if it's a bug, but so far it seems to just not do what it says it is said it will do. Has anyone else gotten earned leaves to work? If so, what's the secret ingredient that I'm missing?
Hello All,
System Info: Ubuntu 20.04 LTS, ERPNext 13.4, Frappe 13.4
I’ve been focused on the HR module in our system for the last few days straight and have noticed a few things that I cannot understand clearly. First, let me preface by sharing that I have read and fully understand the Leave process described in the latest documentation. I’ve also read through many of the existing posts about the leave process and I still haven’t located my answer.
What I’m trying to discover is how and when the earned leave is calculated. I believe that it is run according to the code in the utils.py file in the HR folder.
What isn’t clear to me, after all the reading I’ve done, is when the earned leave is processed and what the specific requirements are for the process to run correctly. Below is what I’ve done to date:
SETUP:
Test User:
1. Created the user as an “employee”
2. Set “Join Date” from May 19th, 2019 This provides two years of working time to use as a test
Attendance:
1. Created Shift Type and named it “Day Shift” for 8 am to 5 pm.
2. Assigned the test user to “Day Shift”
3. Imported Attendance records to the test user for the last two years. Present for 8 hours every weekday on the “Day Shift.”
Leaves:
1. Created a “Casual Leave” Type with these settings;
2. Created several non-earned leaves that are not “carry forward”
3. Created the Leave Periods for the last three calendar years.
4. Created a “Leave Policy” that includes the “Casual Leave” and the other non-earned leaves.
5. Created Leave Policy Assignments for the last two years and assigned the policy to the test user.
RESULTS:
-
Non-Earned Leaves not carried forward:
When attempting to allocate consecutive non-earned leaves, the first allocations fail to expire, even if clearly outdated, so the second can not be added. Yet the summary reports are showing the leaves as expired. The only way to allocate additional non-earned leaves is to force expire the leaves inside the DB. -
Earned Leaves that are carried forward:
Allocating additional earned leaves that are carried forward seems to work. But I assume that this is only because they don’t actually get allocated the first time.
Screenshot of Employee Leave Report: The report shows that none of the Earned leaves have been calculated to date. Since nothing was calculated, nothing carried forward.
In summary, I’m asking what one would need to do to have this show the correct figures. From what I can see I haven’t done anything extraordinary. I’ve just followed the documentation step by step.
This is what leads me to ask “when” the process runs. Because I’m not assuming that it isn’t working at all. Just not yet.
I’m sure that understanding this process better will help many of the companies using ERPNext be able to plan their HR migrations to complete smoothly.
Thanks in advance!