← Back to team overview

openerp-india team mailing list archive

[Bug 1050780] Re: Worked day calculation in Payroll

 

Hello Sean,

Yes You are right, If you select the same day on leave request based on
hours then It's calculate the 1 day. Also the Day field is float field,
So you can easily edit it i.e 0.5.

Your suggestion is calculate this to automatically  which is quite fine
and I agree with you. But it's quite complex to manage it that's why
currently I am considering as a good improvement and feature request.

That's why I am setting this as a "Wishlist'.

Thanks for the reporting!

** Changed in: openobject-addons
   Importance: Undecided => Wishlist

** Changed in: openobject-addons
       Status: New => Confirmed

** Changed in: openobject-addons
     Assignee: (unassigned) => OpenERP R&D Addons Team 3 (openerp-dev-addons3)

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1050780

Title:
  Worked day calculation in Payroll

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  We allow the employees create their leave request in hours by
  inputting the "Number of Days" field with a float number, 0.5 for
  example. But in hr_payroll module, it will be calculated as one full
  day which is not correct.

  I think the problem is in the get_worked_day_lines() method of
  hr_payslip class:

                          #if he was on leave, fill the leaves dict
                          if leave_type in leaves:
                              leaves[leave_type]['number_of_days'] += 1.0
                              leaves[leave_type]['number_of_hours'] += working_hours_on_day
                          else:
                              leaves[leave_type] = {
                                  'name': leave_type,
                                  'sequence': 5,
                                  'code': leave_type,
                                  'number_of_days': 1.0,
                                  'number_of_hours': working_hours_on_day,
                                  'contract_id': contract.id,
                              }

  The number_of_days and number_of_hours should be the actual value in
  the leave request.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1050780/+subscriptions


References