[fix] problem in o2m, not restoring correctly the status of some o2m which caused problem in chart of account wizard

bzr revid: nicolas.vanhoren@openerp.com-20110928115537-8fa3lls2e04b3fau
This commit is contained in:
niv-openerp 2011-09-28 13:55:37 +02:00
parent 4ad8bd6fb9
commit 3400e13621
1 changed files with 2 additions and 0 deletions

View File

@ -1878,6 +1878,7 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({
switch (command[0]) {
case commands.CREATE:
obj['id'] = _.uniqueId(self.dataset.virtual_id_prefix);
obj.defaults = {};
self.dataset.to_create.push(obj);
self.dataset.cache.push(_.clone(obj));
ids.push(obj.id);
@ -1907,6 +1908,7 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({
_.each(value, function(command) {
var obj = {values: command};
obj['id'] = _.uniqueId(self.dataset.virtual_id_prefix);
obj.defaults = {};
self.dataset.to_create.push(obj);
self.dataset.cache.push(_.clone(obj));
ids.push(obj.id);