diff options
| author | Fabien Meghazi <fme@openerp.com> | 2012-11-05 10:30:13 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2012-11-05 10:30:13 +0100 |
| commit | 2994db89ca5ad4a8d7265467e50f33c616b6d258 (patch) | |
| tree | c43f6ce45f221e1f12616efe0dcf271f581f7445 /addons/web_graph/static/src | |
| parent | 903edfe30640acf44899e48c4d94f37302153d58 (diff) | |
| parent | 74cda3df5bdf6be39358d804ea268401ee677401 (diff) | |
[MERGE] trunk
bzr revid: fme@openerp.com-20121105093013-31veb91zkdeiuddh
Diffstat (limited to 'addons/web_graph/static/src')
| -rw-r--r-- | addons/web_graph/static/src/js/graph.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 8d813d10351..3b73201b154 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -257,16 +257,16 @@ instance.web_graph.GraphView = instance.web.View.extend({ var tree = $($.parseXML(view_get['arch'])); var pos = 0; - var xaxis = group_by || []; + var xaxis = _.clone(group_by || []); var yaxis = []; tree.find("field").each(function() { var field = $(this); if (! field.attr("name")) return; - if ((group_by.length == 0) && ((! pos) || field.attr('group'))) { + if ((group_by.length == 0) && ((! pos) || instance.web.py_eval(field.attr('group') || "false"))) { xaxis.push(field.attr('name')); } - if (pos && ! field.attr('group')) { + if (pos && ! instance.web.py_eval(field.attr('group') || "false")) { yaxis.push(field.attr('name')); } pos += 1; @@ -340,8 +340,7 @@ instance.web_graph.GraphView = instance.web.View.extend({ var defs = []; _.each(axis, function(x) { var key = x[xaxis[0]] - defs.push(obj.call("read_group", [new instance.web.CompoundDomain(domain, [[xaxis[0], '=' ,_convert_key(xaxis[0], key)]]), - yaxis.concat(xaxis.slice(1, 2)), xaxis.slice(1, 2)], {context: context}).then(function(res) { + defs.push(obj.call("read_group", [domain, yaxis.concat(xaxis.slice(1, 2)), xaxis.slice(1, 2)], {context: context}).then(function(res) { return [x, key, res]; })); }); |
