[FIX] hr_holidays_public: email permission

This commit is contained in:
Samir Ladoui 2024-12-16 14:23:02 +01:00
parent dfa8824c67
commit b5cc0bbdda
1 changed files with 2 additions and 2 deletions

View File

@ -1529,8 +1529,8 @@ class HRHolidays(models.Model):
def send_email(self):
if self.replace_by:
template = self.env.ref('hr_holidays_public.email_template_employee_replace', False)
template.send_mail(self.id)
template = self.sudo().env.ref('hr_holidays_public.email_template_employee_replace', False)
template.sudo().send_mail(self.id)
def check_sickness_leave_approval(self):
for leave in self: