Skip to content
Snippets Groups Projects
Commit 7e0ff027 authored by Nisha patel's avatar Nisha patel Committed by Barad Mahendra
Browse files

[IMP] hr_holidays: Improve Time Off activity summary


Currently, Dates displaying on activities of Time Off application are
not easy to read for users and We already have dates on the form with
the right user format. So we don't need it again on the chatter

So in this commit, we improve the activity summary message by
removing the dates from summary of activity.

closes odoo/odoo#60610

Taskid: 2339411
Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent d524c48f
No related branches found
No related tags found
No related merge requests found
......@@ -1174,14 +1174,10 @@ class HolidaysRequest(models.Model):
def activity_update(self):
to_clean, to_do = self.env['hr.leave'], self.env['hr.leave']
for holiday in self:
start = UTC.localize(holiday.date_from).astimezone(timezone(holiday.employee_id.tz or 'UTC'))
end = UTC.localize(holiday.date_to).astimezone(timezone(holiday.employee_id.tz or 'UTC'))
note = _(
'New %(leave_type)s Request created by %(user)s from %(start)s to %(end)s',
'New %(leave_type)s Request created by %(user)s',
leave_type=holiday.holiday_status_id.name,
user=holiday.create_uid.name,
start=start,
end=end
)
if holiday.state == 'draft':
to_clean |= holiday
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment