Skip to content

Commit

Permalink
fixed name clash introduced by new api inheritance.
Browse files Browse the repository at this point in the history
  • Loading branch information
veroc committed Feb 27, 2017
1 parent 925812f commit a42dba9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hr_holidays_compute_days/models/hr_holidays.py
Expand Up @@ -46,7 +46,7 @@ def _check_and_recompute_days(self):
raise ValidationError(_("You cannot schedule the end date "
"on a public holiday or employee's "
"rest day"))
self.number_of_days_temp = self._compute_number_of_days()
self.number_of_days_temp = self._compute_effective_number_of_days()

@api.onchange('date_from')
def _onchange_date_from(self):
Expand All @@ -57,7 +57,7 @@ def _onchange_date_from(self):
"a public holiday or employee's rest day"))
if (self.date_to and self.date_from) \
and (self.date_from <= self.date_to):
self.number_of_days_temp = self._compute_number_of_days()
self.number_of_days_temp = self._compute_effective_number_of_days()

@api.onchange('date_to')
def _onchange_date_to(self):
Expand All @@ -68,9 +68,9 @@ def _onchange_date_to(self):
"a public holiday or employee's rest day"))
if (self.date_to and self.date_from) \
and (self.date_from <= self.date_to):
self.number_of_days_temp = self._compute_number_of_days()
self.number_of_days_temp = self._compute_effective_number_of_days()

def _compute_number_of_days(self):
def _compute_effective_number_of_days(self):
date_from = self.date_from
date_to = self.date_to
employee_id = self.employee_id.id
Expand Down

0 comments on commit a42dba9

Please sign in to comment.