diff --git a/addons/portal/models/ir_qweb.py b/addons/portal/models/ir_qweb.py index 9d85910a7d4..0cd76af1808 100644 --- a/addons/portal/models/ir_qweb.py +++ b/addons/portal/models/ir_qweb.py @@ -2,7 +2,7 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models -from odoo.tools import is_html_empty +from odoo.tools import is_html_empty, lazy class IrQWeb(models.AbstractModel): @@ -15,9 +15,9 @@ class IrQWeb(models.AbstractModel): irQweb = super()._prepare_frontend_environment(values) values.update( is_html_empty=is_html_empty, - languages=[lang for + languages=lazy(lambda: [lang for lang in irQweb.env['res.lang'].get_available() - if lang[0] in irQweb.env['ir.http']._get_frontend_langs()] + if lang[0] in irQweb.env['ir.http']._get_frontend_langs()]) ) for key in irQweb.env.context: if key not in values: diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml index ecaee6ddbac..24ca6ad2b50 100644 --- a/addons/portal/views/portal_templates.xml +++ b/addons/portal/views/portal_templates.xml @@ -6,25 +6,27 @@ - + + +
@@ -45,42 +47,57 @@