[FIX] rare problem in m2mtags, when the form view is destroyed just after a reload
authorniv-openerp <nicolas.vanhoren@openerp.com>
Tue, 6 Nov 2012 16:25:25 +0000 (17:25 +0100)
committerniv-openerp <nicolas.vanhoren@openerp.com>
Tue, 6 Nov 2012 16:25:25 +0000 (17:25 +0100)
lp bug: https://launchpad.net/bugs/1075543 fixed

bzr revid: nicolas.vanhoren@openerp.com-20121106162525-c835kdpjpj66e714

addons/web/static/src/js/view_form.js

index 6a853c4..90ec530 100644 (file)
@@ -3922,6 +3922,8 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
         var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.build_context());
         var values = self.get("value")
         var handle_names = function(data) {
+            if (self.isDestroyed())
+                return;
             var indexed = {};
             _.each(data, function(el) {
                 indexed[el[0]] = el;