diff options
| author | Fabien Meghazi <fme@openerp.com> | 2011-09-29 13:48:15 +0200 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2011-09-29 13:48:15 +0200 |
| commit | f2cd835296caf3a1fbc0f037c03977c26522cee2 (patch) | |
| tree | 5e4d07000047f53e62b79b4c7f07dc78a640d571 /addons/web_graph/static/src | |
| parent | c0736631ca4bbe7e73773d90f160ad771720d8fb (diff) | |
[IMP] Fixed gantt in order to support new do_search
bzr revid: fme@openerp.com-20110929114815-4nql5xzwztb77vdm
Diffstat (limited to 'addons/web_graph/static/src')
| -rw-r--r-- | addons/web_graph/static/src/js/graph.js | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index c691ef35975..5a72bf2a816 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -78,9 +78,6 @@ openerp.web_graph.GraphView = openerp.web.View.extend({ } }, this); this.ordinate = this.columns[0].name; - - this.dataset.read_slice( - this.list_fields(), {}, $.proxy(this, 'schedule_chart')); }, schedule_chart: function(results) { var self = this; @@ -365,24 +362,17 @@ openerp.web_graph.GraphView = openerp.web.View.extend({ }); }, - do_search: function(domains, contexts, groupbys) { - var self = this; - this.rpc('/web/session/eval_domain_and_context', { - domains: domains, - contexts: contexts, - group_by_seq: groupbys - }, function (results) { - // TODO: handle non-empty results.group_by with read_group? - if(!_(results.group_by).isEmpty()){ - self.abscissa = results.group_by[0]; - } else { - self.abscissa = self.first_field; - } - self.dataset.read_slice(self.list_fields(), { - context: results.context, - domain: results.domain - }, $.proxy(self, 'schedule_chart')); - }); + do_search: function(domain, context, group_by) { + // TODO: handle non-empty group_by with read_group? + if (!_(group_by).isEmpty()) { + this.abscissa = group_by[0]; + } else { + this.abscissa = this.first_field; + } + this.dataset.read_slice(this.list_fields(), { + context: context, + domain: domain + }, $.proxy(this, 'schedule_chart')); } }); }; |
