addon hr_payroll missing the count of days off
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP R&D Addons Team 3 |
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:
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:
return count
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3) |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
status: | In Progress → Confirmed |
Changed in openobject-addons: | |
status: | Confirmed → Fix Released |
milestone: | none → 6.1 |
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