diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2021-04-12 17:10:12 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2021-04-30 06:16:54 +0000 |
| commit | 7d28f32d9be1590764883f4621df04e04c4e1f12 (patch) | |
| tree | d19120ee4088aeeecce646f4b8280d1b69147451 /addons/website/models | |
| parent | 8bb046796f6fb89d13f3433f23a2de19a65c97a6 (diff) | |
[FIX] website{,_livechat}: 'Website Visitor' translated
Make translation works for "Website Visitor" that was appearing when a
logged-out user open a livechat session.
note: list comprehension has to be removed since translation only search
language in direct calling method closure.
opw-2504461
closes odoo/odoo#70135
X-original-commit: 7e0cf9679ee86e1b3e8094606fd815ffe46eb3c1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/website/models')
| -rw-r--r-- | addons/website/models/website_visitor.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/addons/website/models/website_visitor.py b/addons/website/models/website_visitor.py index cde0cdf6632..a8db8bc4a0e 100644 --- a/addons/website/models/website_visitor.py +++ b/addons/website/models/website_visitor.py @@ -66,10 +66,13 @@ class WebsiteVisitor(models.Model): @api.depends('name') def name_get(self): - return [( - record.id, - (record.name or _('Website Visitor #%s', record.id)) - ) for record in self] + res = [] + for record in self: + res.append(( + record.id, + record.name or _('Website Visitor #%s', record.id) + )) + return res @api.depends('partner_id.email_normalized', 'partner_id.mobile', 'partner_id.phone') def _compute_email_phone(self): |
