Skip to content

Commit

Permalink
Merge pull request #169 from gisce/61363_fix_default_language_on_eval…
Browse files Browse the repository at this point in the history
…_function_comes_from_template

El idioma con prioridad debe ser el que viene en la plantilla y no el que hay en el contexto
  • Loading branch information
lcbautista authored Aug 13, 2024
2 parents a06f88e + 3a2e335 commit f5c2820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion poweremail_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f5c2820

Please sign in to comment.