Hello,
I'm facing an issue in calculating the employee salary. It's that the no. of working days has fraction
At the beginning, allow me to start with expressing my current setup for payroll and contracts
-each employee has a contract with working schedule of:
from Saturday to Wednesday as full time
Thursday is half day
Friday off
-each employee has an unpaid leave salary rule in his salary structure.
the unpaid leave is to deduct the approved leave request from employee.
the formula to calculate unpaid leave is
#Python Code |
The problem is when you go to payroll module to generate an employee payslip, in Working days & inputs tab I get the number of days @WORK100 is 27.75 for Jan 2017
and number of days @Unpaid is 1.13
but in reality it should be only 27 days @WORK100, as in January 2017 we have:
total days/month: 31
No. of occurred Fridays: 4 days
total worked days @WORK100 should be: 31-4=27
Why Odoo is calculating the no. of days with fraction? .. In what basis Odoo calculates the working days?
This is also impacting on the unpaid leave calculation which is based on the no. of days
Is something wrong in my current setup? Do I miss something?
Can someone please help me with this setup
Thanks