From 1ea609ba651c070d1d90c3321a210a2346de17ea Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 7 Jun 2013 17:23:26 +0200 Subject: [FIX] bugs discovered by failing onwrite test case Following xmo@openerp.com-20130607120355-x3poxy2ar2bpqqvw: * add_ids should not add ids which are already in the dataset, this leads to duplicates which the web client does not overly like * methods which add or remove records should not manipulate dataset.ids as well as that's now automatic (on_write feature) * record add should only insert the id in the dataset on non-false ids (e.g. list edition uses "pending" record with false id during creation, then sets the id it got from create() call) bzr revid: xmo@openerp.com-20130607152326-2pja1kuwo0ropfuw --- addons/web/static/src/js/view_list_editable.js | 1 - 1 file changed, 1 deletion(-) (limited to 'addons/web/static/src/js/view_list_editable.js') diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index 4e042b60c5d..512fc4ff373 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -429,7 +429,6 @@ openerp.web.list_editable = function (instance) { var index = this.records.indexOf(source_record) + 1; record = this.make_empty_record(id); this.records.add(record, {at: index}); - this.dataset.ids.splice(index, 0, id); } return this.reload_record(record); }, -- cgit v1.2.3