From 3a2e335a0c93dffff6f07e0665f62948d6049b32 Mon Sep 17 00:00:00 2001 From: Luis Carlos Bautista Date: Fri, 9 Aug 2024 14:35:37 +0200 Subject: [PATCH] fix: idioma correo prioriza el idioma de la plantilla en vez del context --- poweremail_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poweremail_template.py b/poweremail_template.py index 6b718bc..4ae49ac 100644 --- a/poweremail_template.py +++ b/poweremail_template.py @@ -186,7 +186,7 @@ def get_value(cursor, user, recid, message=None, template=None, context=None): context = {} ctx = context.copy() ctx['browse_reference'] = True - ctx['lang'] = context.get('lang', False) + ctx['lang'] = template._context.get('lang', context.get('lang', False)) if not ctx['lang']: ctx['lang'] = get_email_default_lang() object = pool.get(template.object_name.model).simple_browse(cursor, user, recid, context=ctx)