[FIX] rare problem in m2mtags, when the form view is destroyed just after a reload

lp bug: https://launchpad.net/bugs/1075543 fixed

bzr revid: nicolas.vanhoren@openerp.com-20121106162525-c835kdpjpj66e714
This commit is contained in:
niv-openerp 2012-11-06 17:25:25 +01:00
parent 025167e4fc
commit 2a9779045f
1 changed files with 2 additions and 0 deletions

View 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;