Skip to content
Permalink
Browse files

[FIX] hr_payroll: call correct method

Oversight of previous forward-port
  • Loading branch information...
KangOl committed Feb 22, 2019
1 parent 0e76758 commit b13305fddccc94f231ef16d55457d4a9fc71820f
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/hr_payroll/models/hr_leave.py
@@ -163,7 +163,7 @@ def _get_number_of_days(self, date_from, date_to, employee_id):
# Use sudo otherwise base users can't compute number of days
contracts = employee.sudo()._get_contracts(date_from, date_to, states=['incoming', 'open', 'pending'])
calendar = contracts[:1].resource_calendar_id if contracts else None # Note: if len(contracts)>1, the leave creation will crash because of unicity constaint
return employee.get_work_days_data(date_from, date_to, calendar=calendar)['days']
return employee._get_work_days_data(date_from, date_to, calendar=calendar)['days']

return days

0 comments on commit b13305f

Please sign in to comment.
You can’t perform that action at this time.