[imp] reverted some code removed for on_change
bzr revid: nicolas.vanhoren@openerp.com-20110630091439-do2bjsf30r1iemgw
This commit is contained in:
parent
2cc0d8d537
commit
f4faa0dcfb
|
@ -1501,6 +1501,18 @@ openerp.base.form.FieldOne2Many = openerp.base.form.Field.extend({
|
|||
});
|
||||
this._super(ids);
|
||||
this.dataset.set_ids(ids);
|
||||
} else if (value.length >= 1 && typeof(value[0]) === "object") {
|
||||
var ids = [];
|
||||
this.dataset.delete_all = true;
|
||||
_.each(value, function(command) {
|
||||
var obj = {values: command};
|
||||
obj['id'] = _.uniqueId(self.dataset.virtual_id_prefix);
|
||||
self.dataset.to_create.push(obj);
|
||||
self.dataset.cache.push(_.clone(obj));
|
||||
ids.push(obj.id);
|
||||
});
|
||||
this._super(ids);
|
||||
this.dataset.set_ids(ids);
|
||||
} else {
|
||||
this._super(value);
|
||||
this.dataset.reset_ids(value);
|
||||
|
|
Loading…
Reference in New Issue