diff --git a/addons/im_livechat/models/im_livechat_channel.py b/addons/im_livechat/models/im_livechat_channel.py index a5c187a1067..18a112d526a 100644 --- a/addons/im_livechat/models/im_livechat_channel.py +++ b/addons/im_livechat/models/im_livechat_channel.py @@ -149,7 +149,7 @@ class ImLivechatChannel(models.Model): return False # choose the res.users operator and get its partner id operator = random.choice(operators) - operator_partner_id = random.choice(operators).partner_id.id + operator_partner_id = operator.partner_id.id # partner to add to the mail.channel channel_partner_to_add = [(4, operator_partner_id)] if self.env.user and self.env.user.active: # valid session user (not public)