Merge pull request #791 from odoo/revert-483-saas-5-report-translation-fix-sle
[odoo/odoo.git] / addons / report / controllers / main.py
index 01992d6..c6bc13d 100644 (file)
@@ -50,12 +50,7 @@ class ReportController(Controller):
         if data.get('options'):
             options_data = simplejson.loads(data['options'])
         if data.get('context'):
-            # Ignore 'lang' here, because the context in data is the one from the webclient *but* if
-            # the user explicitely wants to change the lang, this mechanism overwrites it. 
-            data_context = simplejson.loads(data['context'])
-            if data_context.get('lang'):
-                del data_context['lang']
-            context.update(data_context)
+            context.update(simplejson.loads(data['context']))
 
         if converter == 'html':
             html = report_obj.get_html(cr, uid, docids, reportname, data=options_data, context=context)