Skip to content

Commit

Permalink
Merge pull request #109 from hbrunn/15.0-108-dont_break_without_employee
Browse files Browse the repository at this point in the history
[FIX] #108 don't break in UI when user doesn't have an employee
  • Loading branch information
albig authored Feb 20, 2024
2 parents fcd7275 + 0afbe5e commit 868dfc8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion verdigado_attendance/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ class ResUsers(models.Model):

@api.model
def get_effective_holiday_overtime_factor(self):
return self.env.user.employee_id._get_effective_holiday_overtime_factor()
if self.env.user.employee_id:
return self.env.user.employee_id._get_effective_holiday_overtime_factor()
else:
return 1.0

0 comments on commit 868dfc8

Please sign in to comment.