diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2021-04-12 17:10:12 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2021-04-30 10:56:07 +0000 |
| commit | ed2e11265eb8032c3a54b3eabedfce345352284b (patch) | |
| tree | 40b4a04f67b0e39258b493c6e97cd7de50e0fd12 /addons | |
| parent | 02a68278a9af2c477cc9a30716feabb0b533b7e7 (diff) | |
[FIX] im_livechat: 'Visitor' translated in livechat
Make translation work for "Visitor" that was appearing in livechat
session to the visitor.
opw-2504461
closes odoo/odoo#70164
X-original-commit: 3b199007bd5a472d57f823a63b2b77841b14c7fc
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/im_livechat/models/im_livechat_channel.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/im_livechat/models/im_livechat_channel.py b/addons/im_livechat/models/im_livechat_channel.py index a79734a92ef..0938b6bff6f 100644 --- a/addons/im_livechat/models/im_livechat_channel.py +++ b/addons/im_livechat/models/im_livechat_channel.py @@ -4,7 +4,7 @@ import base64 import random import re -from odoo import api, fields, models, modules +from odoo import api, fields, models, modules, _ class ImLivechatChannel(models.Model): @@ -225,6 +225,8 @@ class ImLivechatChannel(models.Model): def get_livechat_info(self, username='Visitor'): self.ensure_one() + if username == 'Visitor': + username = _('Visitor') info = {} info['available'] = len(self._get_available_users()) > 0 info['server_url'] = self.env['ir.config_parameter'].sudo().get_param('web.base.url') |
