[FIX] hr_holidays: correct unclear time off approval email flow

- Remove context which came from the calendar action to only show short name in activity message
- Replace date connector with - as a / does not help to better understand the data given

closes odoo/odoo#158220

X-original-commit: 125793980e10f0c7d186f5662e4abbb3de3e212a
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
This commit is contained in:
Wolfgang Taferner
2024-03-21 18:35:48 +00:00
committed by sofiagvaladze
parent 7fa4f71b63
commit 801ce62150
+2 -2
View File
@@ -856,7 +856,7 @@ Attempting to double-book your time off won't magically make your vacation 2x be
)
else:
if leave.number_of_days > 1 and date_from_utc and date_to_utc:
display_date += ' / %s' % format_date(self.env, date_to_utc) or ""
display_date += ' - %s' % format_date(self.env, date_to_utc) or ""
if not target or self.env.context.get('hide_employee_name') and 'employee_id' in self.env.context.get('group_by', []):
leave.display_name = _("%(leave_type)s: %(duration).2f days (%(start)s)",
leave_type=time_off_type_display,
@@ -1606,7 +1606,7 @@ Attempting to double-book your time off won't magically make your vacation 2x be
to_do_confirm_activity.activity_feedback(['hr_holidays.mail_act_leave_approval'])
if to_do:
to_do.activity_feedback(['hr_holidays.mail_act_leave_approval', 'hr_holidays.mail_act_leave_second_approval'])
self.env['mail.activity'].create(activity_vals)
self.env['mail.activity'].with_context(short_name=False).create(activity_vals)
####################################################
# Messaging methods