addon hr_payroll missing the count of days off

Bug #819536 reported by Fábio Cerqueira
10
This bug affects 1 person
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:
                    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

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Meera Trambadia (OpenERP) (mtr-openerp) wrote :

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

Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Confirmed
Changed in openobject-addons:
status: Confirmed → Fix Released
milestone: none → 6.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.