[FIX] Graph - Add context in fields_get to have the right translation in col_header...
authorKersten Jeremy <jke@openerp.com>
Wed, 7 May 2014 15:47:58 +0000 (17:47 +0200)
committerKersten Jeremy <jke@openerp.com>
Wed, 7 May 2014 15:47:58 +0000 (17:47 +0200)
lp bug: https://launchpad.net/bugs/1317079 fixed

bzr revid: jke@openerp.com-20140507154758-0vkq9rywjyl55f5w

addons/web_graph/static/src/js/graph_widget.js

index 78fa7ce..bf6df08 100644 (file)
@@ -42,7 +42,9 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
             this.$('.graph_main_content').addClass('graph_pivot_mode');
         }
 
-        return this.model.call('fields_get', []).then(function (f) {
+        return this.model.call('fields_get', {
+                context: self.graph_view.dataset.context
+            }).then(function (f) {
             self.fields = f;
             self.fields.__count = {field:'__count', type: 'integer', string:_t('Quantity')};
             self.important_fields = self.get_search_fields();