diff options
| author | David Beguin <dbe@odoo.com> | 2018-12-17 09:24:58 +0000 |
|---|---|---|
| committer | David Beguin <dbe@odoo.com> | 2018-12-17 09:54:08 +0000 |
| commit | f0741b3f3eb9236acfcd76a11c1bf5bb2ea107d5 (patch) | |
| tree | a7902742abd5f00b0aa546eb56fdaa7c8327909d /addons | |
| parent | 1fa10cbc5d8a02aea9910512007afbcfc61b37b3 (diff) | |
[FIX] im_livechat : fix random operator and channel name mismatch
Before, the name of the channel was not always matching the real channel operator,
as a second random was made on operators.
This commit fix this.
Task ID : 1918350
Closes PR #29570
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/im_livechat/models/im_livechat_channel.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
