From 7e0ff027d68c0ce9a46d98cf8ac8ece57d099084 Mon Sep 17 00:00:00 2001
From: Nisha patel <nit@odoo.com>
Date: Fri, 23 Oct 2020 11:08:12 +0000
Subject: [PATCH] [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: Yannick Tivisse (yti) <yti@odoo.com>
---
 addons/hr_holidays/models/hr_leave.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/addons/hr_holidays/models/hr_leave.py b/addons/hr_holidays/models/hr_leave.py
index 44dff79fb3c6..6727954c8473 100644
--- a/addons/hr_holidays/models/hr_leave.py
+++ b/addons/hr_holidays/models/hr_leave.py
@@ -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
-- 
GitLab