[FIX] bugs discovered by failing onwrite test case
authorXavier Morel <xmo@openerp.com>
Fri, 7 Jun 2013 15:23:26 +0000 (17:23 +0200)
committerXavier Morel <xmo@openerp.com>
Fri, 7 Jun 2013 15:23:26 +0000 (17:23 +0200)
commit1ea609ba651c070d1d90c3321a210a2346de17ea
tree049b556a3a016a6d3c9cc7229845b78a013d3c91
parentaa423f4cb11b6fc50355a54b51c3a281c7b5b373
[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/data.js
addons/web/static/src/js/view_list.js
addons/web/static/src/js/view_list_editable.js