summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2014-11-27 16:03:14 +0100
committerDenis Ledoux <dle@odoo.com>2014-11-27 16:06:05 +0100
commit15d87a17325c8ee0696e0f16a9a9ad7c09d342de (patch)
treefc1e74b8e5ab91ad6c516b5269a9a40ab181cff0 /addons/web_graph/static/src
parent62bc63e44f470ce0d6003fcc1fb9fd2d16350e4e (diff)
[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
Diffstat (limited to 'addons/web_graph/static/src')
-rw-r--r--addons/web_graph/static/src/js/graph_widget.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web_graph/static/src/js/graph_widget.js b/addons/web_graph/static/src/js/graph_widget.js
index a08ee529a67..13dc558c287 100644
--- a/addons/web_graph/static/src/js/graph_widget.js
+++ b/addons/web_graph/static/src/js/graph_widget.js
@@ -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();