[imp] added save to o2m

bzr revid: nicolas.vanhoren@openerp.com-20110623172737-koryk7a8ecoobtt7
This commit is contained in:
niv-openerp
2011-06-23 19:27:37 +02:00
parent 6de6267db7
commit df6d64249d
+4 -2
View File
@@ -1396,8 +1396,10 @@ openerp.base.form.FieldOne2Many = openerp.base.form.Field.extend({
});
},
get_value: function() {
var val = _.map(this.dataset.to_delete, function(v, k) {return [2, parseInt(k, 10)];});
var val = val.concat(_.map(this.dataset.to_create, function(x) {return [0, 0, x];}));
var val = _.map(this.dataset.to_delete, function(v, k) {return [2, x.id];});
val = val.concat(_.map(this.dataset.to_create, function(x) {return [0, 0, x.values];}));
val = val.concat(_.map(this.dataset.to_write, function(x) {return [1, x.id, x.values];}));
debugger;
return val;
},
validate: function() {