[FIX] Load translations for selection fields
authorandreparames <github@andreparames.com>
Thu, 28 Aug 2014 15:41:45 +0000 (16:41 +0100)
committerandreparames <github@andreparames.com>
Thu, 28 Aug 2014 15:41:45 +0000 (16:41 +0100)
Selection fields in the new QWeb reports aren't being translated, because the context with the language isn't being passed.

openerp/addons/base/ir/ir_qweb.py

index 1ef2212..73ab479 100644 (file)
@@ -692,7 +692,7 @@ class SelectionConverter(osv.AbstractModel):
         value = record[field_name]
         if not value: return ''
         selection = dict(fields.selection.reify(
-            cr, uid, record._model, column))
+            cr, uid, record._model, column, context=context))
         return self.value_to_html(
             cr, uid, selection[value], column, options=options)