c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #30179
[Bug 819536] Re: addon hr_payroll missing the count of days off
Hello,
I have checked and found that it exists in the old payroll system.For
e.g. if you have an approved leave(unpaid) on the last date of the month
say 31-8-11,it wont be considered in the payslip calculation.We have
already fixed it in the trunk. So i request you to check again with
latest trunk.
Thanks,
mtr
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/819536
Title:
addon hr_payroll missing the count of days off
Status in OpenERP Modules (addons):
Confirmed
Bug description:
When the end of the month ends on a off day he does not count,
probably because the range used in the function get_days use
range(start, end) and not range(start, end + 1) on line 1044.
- Current
#Check for the Holidays
def get_days(start, end, month, year, calc_day):
import datetime
count = 0
for day in range(start, end):
if datetime.date(year, month, day).weekday() == calc_day:
count += 1
return count
- Correted
#Check for the Holidays
def get_days(start, end, month, year, calc_day):
import datetime
count = 0
for day in range(start, end + 1):
if datetime.date(year, month, day).weekday() == calc_day:
count += 1
return count
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/819536/+subscriptions
References