summaryrefslogtreecommitdiff
path: root/addons/web_graph/static
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2012-11-05 14:08:32 +0100
committerChristophe Matthieu <chm@openerp.com>2012-11-05 14:08:32 +0100
commitc045cdd5028ea5e883a97c2b583282e4db11b1bc (patch)
tree68266f64936dd6a9635469721fe6802894c44a9d /addons/web_graph/static
parente79b8e29120f319b1e3b0655088971059f203d02 (diff)
parent6f57449dcd48714ff9df5ff37dfbc0882610020e (diff)
[MERGE] merge from trunk
bzr revid: chm@openerp.com-20121105130832-klztvfcz8s88oe0j
Diffstat (limited to 'addons/web_graph/static')
-rw-r--r--addons/web_graph/static/src/js/graph.js9
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 b0106bc8f01..8d8d49d0a44 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}).pipe(function(res) {
+ defs.push(obj.call("read_group", [domain, yaxis.concat(xaxis.slice(1, 2)), xaxis.slice(1, 2)], {context: context}).pipe(function(res) {
return [x, key, res];
}));
});