[FIX] web_graph: pass context to fields_get for translation
In graph views, fields from the pivot table were not translated in the user language We pass the context, containing the user language, to fields_get in order to get the translation This is also done by the search view, in search.js line 1978 at this rev. opw-616713
This commit is contained in:
parent
62bc63e44f
commit
15d87a1732
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue