Skip to content

Commit

Permalink
[FIX] hr_holidays_public: Line too long
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobaeza committed May 1, 2024
1 parent b93c4dd commit b2cdba7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions hr_holidays_public/models/hr_leave.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ class HrLeave(models.Model):
_inherit = "hr.leave"

def action_validate(self):
"""Inject the needed context for excluding public holidays (if applicable) on the
actions derived from this validation. This is required for example for
`project_timesheet_holidays` for not generating the timesheet on the public holiday.
Unfortunately, no regression test can be added, being in a separate module."""
"""Inject the needed context for excluding public holidays (if applicable) on
the actions derived from this validation. This is required for example for
`project_timesheet_holidays` for not generating the timesheet on the public
holiday. Unfortunately, no regression test can be added, being in a separate
module.
"""
if self.holiday_status_id.exclude_public_holidays or not self.holiday_status_id:
self = self.with_context(
employee_id=self.employee_id.id, exclude_public_holidays=True
Expand Down

0 comments on commit b2cdba7

Please sign in to comment.