[FIX] web_graph: pass context to fields_get for translation
[odoo/odoo.git] / addons / web_graph / static / src / js / graph_widget.js
index a08ee52..13dc558 100644 (file)
@@ -54,7 +54,9 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
             self.$('.graph_options_selection label').last().toggle(result);
         });
 
-        return this.model.call('fields_get', []).then(function (f) {
+        return this.model.call('fields_get', {
+                    context: this.graph_view.dataset.context
+                }).then(function (f) {
             self.fields = f;
             self.fields.__count = {field:'__count', type: 'integer', string:_t('Count')};
             self.groupby_fields = self.get_groupby_fields();