diff options
| author | Randhir Mayatra rma-openerp <rma@tinyerp.com> | 2014-04-11 11:48:43 +0530 |
|---|---|---|
| committer | Randhir Mayatra rma-openerp <rma@tinyerp.com> | 2014-04-11 11:48:43 +0530 |
| commit | a8e2cf30069246e90d0e06fc42fe6b64f2e1cfa2 (patch) | |
| tree | f33bb4203334f53ac0d87a11bf4d61834d5009d1 /addons/web_graph/static/src/js/graph_widget.js | |
| parent | c037ebb362cf196edabc07a7e40c85a15a51eb27 (diff) | |
| parent | 60f74ff3f4c7bb1e5208b0f4be3ef2577a5645f4 (diff) | |
[MERGE] merge with latest trunk
bzr revid: rma@tinyerp.com-20140411061843-kxugxk0p63ifkjg7
Diffstat (limited to 'addons/web_graph/static/src/js/graph_widget.js')
| -rw-r--r-- | addons/web_graph/static/src/js/graph_widget.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/addons/web_graph/static/src/js/graph_widget.js b/addons/web_graph/static/src/js/graph_widget.js index 3d8d8fa2d98..317ea6cbfb9 100644 --- a/addons/web_graph/static/src/js/graph_widget.js +++ b/addons/web_graph/static/src/js/graph_widget.js @@ -453,12 +453,25 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({ build_rows: function (raw) { var self = this, pivot = this.pivot, - m, cell; + m, i, cell; return _.map(pivot.rows.headers, function (row) { var cells = []; + var pivot_cells = []; + for (i = 0; i < pivot.cells.length; i++) { + if (pivot.cells[i].x == row.id || pivot.cells[i].y == row.id) { + pivot_cells.push(pivot.cells[i]); + } + } _.each(pivot.get_cols_leaves(), function (col) { - var values = pivot.get_values(row.id,col.id); + var values; + for (i = 0; i < pivot_cells.length; i++) { + if (pivot_cells[i].x == col.id || pivot_cells[i].y == col.id) { + values = pivot_cells[i].values; + break; + } + } + if (!values) { values = new Array(pivot.measures.length);} for (m = 0; m < pivot.measures.length; m++) { cells.push(self.make_cell(row,col,values[m], m, raw)); } |
