odoo/odoo#63526

Created by Ivan Elizaryev (iel)
Merged at e9ef98410fa6acba165f3056d9c52f8e68cc768b

Statuses:

  • legal/cla: Contributor License Agreement check
  • ci/runbot: Odoo Test Suite
  • ci/upgrade_enterprise: Test upgrades for enterprise master
  • ci/template: Install databases to use to test upgrade in master and ensure that upgrades works with current master.
  • ci/style: Optional style check. Ignore it only if strictly necessary.
  • ci/security: Required security check. Can only be ignored by security team.
label
odoo-dev:14.0-opw-2416586-portal-language-not-found-IEL
head
e4a11fa8d247a8144c9657f3cd562fe805a7b09e
merged
4 years ago by Ivan Elizaryev (iel)
odoo/odoo
14.0 #63526
saas-14.1 #63638
15.0
16.0
17.0
saas-17.4
18.0
saas-18.1
saas-18.2
saas-18.3
master #63640

[FIX] portal: show default lang in selector when lang is not found

STEPS:
* install project, website
* install translation, but don't apply to website
* create a task with Customer that has that language
* close the task
* open rating request message in Settings >> Technical >> Messages
* click any of the smiles

BEFORE:

Error to render compiling AST
IndexError: list index out of range
Template: portal.language_selector
Path: /t/t[1]
Node: <t t-set="active_lang" t-value="list(filter(lambda lg : lg[0] == lang,
languages))[0]"/>

AFTER:
no errors, page is translated to customer's language, though language selector
shows default website's language


opw-2416586

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr