c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #29726
[Bug 819536] [NEW] addon hr_payroll missing the count of days off
Public bug reported:
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
** Affects: openobject-addons
Importance: Undecided
Status: New
** Tags: off-days payroll payslip
--
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):
New
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
Follow ups
References