summaryrefslogtreecommitdiff
path: root/addons/web_graph
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2014-09-04 10:12:52 +0200
committerGéry Debongnie <ged@odoo.com>2014-10-21 09:33:49 +0200
commitffb8bf31af57cf845796acc90fa0f8b8b7d14de3 (patch)
tree8f95610cd188ebd33dc9883756eccadb51330cf5 /addons/web_graph
parent582ccb5ab9061bcc3cd4d1511ca6c5c1d20a6adc (diff)
[FIX] fixes many issues with the various views
the views don't always return a proper promise, or were somewhat fragile and broke with the changes in the view manager.
Diffstat (limited to 'addons/web_graph')
-rw-r--r--addons/web_graph/static/src/js/graph_view.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/web_graph/static/src/js/graph_view.js b/addons/web_graph/static/src/js/graph_view.js
index 646a730b51b..a892f348511 100644
--- a/addons/web_graph/static/src/js/graph_view.js
+++ b/addons/web_graph/static/src/js/graph_view.js
@@ -31,6 +31,8 @@ instance.web_graph.GraphView = instance.web.View.extend({
get_domain: function () {},
get_groupby: function () {},
};
+
+ this.view_loaded = $.Deferred();
},
view_loading: function (fields_view_get) {
@@ -72,9 +74,17 @@ instance.web_graph.GraphView = instance.web.View.extend({
if (self.widget_config.measures.length === 0) {
self.widget_config.measures.push('__count');
}
+ this.view_loaded.resolve();
},
do_search: function (domain, context, group_by) {
+ var self = this;
+ this.view_loaded.done(function () {
+ self._do_search(domain, context, group_by);
+ });
+ },
+
+ _do_search: function (domain, context, group_by) {
if (this.ignore_do_search) {
this.ignore_do_search = false;
return;