Skip to content

Commit

Permalink
Update code when getting holiday status id to take the id, not the re…
Browse files Browse the repository at this point in the history
…cord.
  • Loading branch information
feketemihai committed Mar 31, 2016
1 parent a383215 commit 33f8178
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hr_holidays_compute_days/models/hr_holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class HrHolidays(models.Model):

@api.model
def _check_date_helper(self, employee_id, date):
status_id = self.holiday_status_id or self.env.context.get(
status_id = self.holiday_status_id.id or self.env.context.get(
'holiday_status_id',
False)
if employee_id and status_id:
Expand Down Expand Up @@ -74,7 +74,7 @@ def _compute_number_of_days(self, employee_id, date_to, date_from):
days = self._get_number_of_days(date_from, date_to)
if days or date_to == date_from:
days = round(math.floor(days))+1
status_id = self.holiday_status_id or self.env.context.get(
status_id = self.holiday_status_id.id or self.env.context.get(
'holiday_status_id',
False)
if employee_id and date_from and date_to and status_id:
Expand Down

0 comments on commit 33f8178

Please sign in to comment.