[MERGE] Latest trunk.
[odoo/odoo.git] / addons / web_diagram / static / src / js / diagram.js
index 572a91c..8672c9a 100644 (file)
@@ -273,7 +273,7 @@ instance.web.DiagramView = instance.web.View.extend({
             self.dataset.domain,
             self.context || self.dataset.context
         );
-        pop.on_select_elements.add_last(function(element_ids) {
+        pop.on("select_elements", self, function(element_ids) {
             self.dataset.read_index(_.keys(self.fields_view.fields)).pipe(self.on_diagram_loaded);
         });
 
@@ -325,8 +325,7 @@ instance.web.DiagramView = instance.web.View.extend({
             this.dataset.domain,
             this.context || this.dataset.context
         );
-
-        pop.on_select_elements.add_last(function(element_ids) {
+        pop.on("select_elements", self, function(element_ids) {
             self.dataset.read_index(_.keys(self.fields_view.fields)).pipe(self.on_diagram_loaded);
         });
         // We want to destroy the dummy edge after a creation cancel. This destroys it even if we save the changes.