diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2017-09-07 11:35:15 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2017-09-07 15:54:26 +0200 |
| commit | 6879409723184ed360043b7a2da11fcd725e5c4f (patch) | |
| tree | 44e1786ac1eff6108714d6b2e8eb264e3cca9f93 /addons | |
| parent | 73edebc371669ea3b68c7f14301b2ef6f3df0d60 (diff) | |
[FIX] im_livechat: unsupported locale
- Set the browser to language 'Spanish (Latin America)' ('es-419')
- As a public user, open a livechat session.
The session doesn't open.
The root cause is the creation of a mail channel which contains
translatable fields (e.g. name). This attempts to create translations
in the 'es_419' language. However, this locale doesn't exist in Odoo,
and it triggers the constraint 'lang_fkey_res_lang'.
In this specific case, there is no real reason to translate the channel
name. Therefore, we simply avoid it thanks to a context key.
opw-766489
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/im_livechat/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/im_livechat/controllers/main.py b/addons/im_livechat/controllers/main.py index a60ecd26ff7..dd3a4a97fbc 100644 --- a/addons/im_livechat/controllers/main.py +++ b/addons/im_livechat/controllers/main.py @@ -75,7 +75,7 @@ class LivechatController(http.Controller): # if the user is identifiy (eg: portal user on the frontend), don't use the anonymous name. The user will be added to session. if request.session.uid: anonymous_name = request.env.user.name - return request.env["im_livechat.channel"].get_mail_channel(channel_id, anonymous_name) + return request.env["im_livechat.channel"].with_context(lang=False).get_mail_channel(channel_id, anonymous_name) @http.route('/im_livechat/feedback', type='json', auth='public') def feedback(self, uuid, rate, reason=None, **kwargs): |
