From 2dee324384e3cd162e0613a0e06d19603abc65fa Mon Sep 17 00:00:00 2001 From: zel-odoo Date: Mon, 16 Oct 2023 10:13:55 +0200 Subject: [PATCH] [IMP] mail: remove link from creation notification Previously, a link was included when creating a channel, but this was unnecessary since there is no way to see the link when you are not in the channel. This commit removes the link while keeping the notification to show the author and time of channel creation. closes odoo/odoo#138668 Signed-off-by: Matthieu Stockbauer (tsm) --- addons/mail/models/discuss/discuss_channel.py | 4 +--- addons/mail/static/src/core/common/thread.xml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/mail/models/discuss/discuss_channel.py b/addons/mail/models/discuss/discuss_channel.py index c785efa414d..6f783cf548b 100644 --- a/addons/mail/models/discuss/discuss_channel.py +++ b/addons/mail/models/discuss/discuss_channel.py @@ -1153,9 +1153,7 @@ class Channel(models.Model): new_channel = self.create(vals) group = self.env['res.groups'].search([('id', '=', group_id)]) if group_id else None new_channel.group_public_id = group.id if group else None - notification = (Markup('
%s
') % _("created %(link)s")) % { - 'link': Markup('#%s') % (new_channel.id, new_channel.name) - } + notification = Markup('
created this channel.
') new_channel.message_post(body=notification, message_type="notification", subtype_xmlid="mail.mt_comment") channel_info = new_channel._channel_info()[0] self.env['bus.bus']._sendone(self.env.user.partner_id, 'mail.record/insert', {"Thread": channel_info}) diff --git a/addons/mail/static/src/core/common/thread.xml b/addons/mail/static/src/core/common/thread.xml index d8daaf0ebf0..6ee521e01ea 100644 --- a/addons/mail/static/src/core/common/thread.xml +++ b/addons/mail/static/src/core/common/thread.xml @@ -114,7 +114,7 @@ 'mt-2': prevMsg and !prevMsg.isNotification, }" t-ref="root"> - +