Skip to content

Commit

Permalink
Merge PR #161 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by nimarosa
  • Loading branch information
OCA-git-bot committed Jul 11, 2024
2 parents 08bb8ab + baae43b commit f0394f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions payroll/models/hr_payslip.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def get_worked_day_lines(self, contracts, date_from, date_to):
res.append(attendances)
return res

def _compute_leave_days(self, contract, day_from, day_to):
def _compute_leave_days(self, contract, day_from, day_to, leave_domain=None):
"""
Leave days computation
@return: returns a list containing the leave inputs for the period
Expand All @@ -342,7 +342,10 @@ def _compute_leave_days(self, contract, day_from, day_to):
calendar = contract.resource_calendar_id
tz = timezone(calendar.tz)
day_leave_intervals = contract.employee_id.list_leaves(
day_from, day_to, calendar=contract.resource_calendar_id
day_from,
day_to,
calendar=contract.resource_calendar_id,
domain=leave_domain,
)
for day, hours, leave in day_leave_intervals:
holiday = leave[:1].holiday_id
Expand Down

0 comments on commit f0394f8

Please sign in to comment.