From 28384257422657ff3ee573b14f9301700f10bda0 Mon Sep 17 00:00:00 2001 From: Arnaud Joset Date: Tue, 4 Jul 2023 08:25:31 +0000 Subject: [PATCH] [FIX] calendar: allow disabling bus notification in views Before this commit, when the user group calendar.event by private fields, a bus notification is sent to exlain that private fields can't be displayed and the private events are hidden from the result. It was an issue in some views where group by private fields was used by default and multiple notifications were displayed. closes odoo/odoo#131970 Taskid: 3328718 X-original-commit: e3df5d96fc9ca6d7f400c2e0167ef53ebf7c524a Signed-off-by: Arnaud Joset (arj) --- addons/calendar/models/calendar_event.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/addons/calendar/models/calendar_event.py b/addons/calendar/models/calendar_event.py index 2092cb3e2b7..bdec6689e98 100644 --- a/addons/calendar/models/calendar_event.py +++ b/addons/calendar/models/calendar_event.py @@ -679,11 +679,6 @@ class Meeting(models.Model): if not self.env.su and private_fields: # display public and confidential events domain = AND([domain, ['|', ('privacy', '!=', 'private'), ('user_id', '=', self.env.user.id)]]) - self.env['bus.bus']._sendone(self.env.user.partner_id, 'simple_notification', { - 'type': 'danger', - 'title': _('Private Event Excluded'), - 'message': _('Grouping by %s is not allowed on private events.', ', '.join([self._fields[field_name].string for field_name in private_fields])) - }) return super(Meeting, self).read_group(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy) return super(Meeting, self).read_group(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)