[IMP] lot of small improvements to better detect when a view has finished loading
[odoo/odoo.git] / addons / web_diagram / static / src / js / diagram.js
index 00b2cdf..2d3e3cc 100644 (file)
@@ -22,10 +22,13 @@ instance.web.DiagramView = instance.web.View.extend({
         this.domain = this.dataset._domain || [];
         this.context = {};
         this.ids = this.dataset.ids;
-        this.on('view_loaded', self, self.load_diagram);
         this.on('pager_action_executed', self, self.pager_action_trigger);
     },
 
+    view_loading: function(r) {
+        return this.load_diagram(r);
+    },
+
     toTitleCase: function(str) {
         return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
     },