19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:39 +01:00
parent 5df8c07b59
commit daa394e8b0
2114 changed files with 564841 additions and 299642 deletions

View file

@ -0,0 +1,21 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class IrWebsocket(models.AbstractModel):
_inherit = "ir.websocket"
def _build_bus_channel_list(self, channels):
channels = list(channels) # do not alter original list
if any(
channel == "im_livechat.looking_for_help"
for channel in channels
if isinstance(channel, str)
):
if self.env.user.has_group("im_livechat.im_livechat_group_user"):
channels.append(
(self.env.ref("im_livechat.im_livechat_group_user"), "LOOKING_FOR_HELP")
)
channels.remove("im_livechat.looking_for_help")
return super()._build_bus_channel_list(channels)