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)