[FIX] ids of deleted records living in shared dataset when clicking on list row
authorXavier Morel <xmo@openerp.com>
Tue, 16 Apr 2013 15:20:00 +0000 (17:20 +0200)
committerXavier Morel <xmo@openerp.com>
Tue, 16 Apr 2013 15:20:00 +0000 (17:20 +0200)
commitc19bc506484d162d7d85beab6d2c0efbbf474035
tree5293e6e919e2f316cea6c281e64f5179be6ef84d
parenta455d6c2b27fb8a90c8993abb176da64c0952b5c
[FIX] ids of deleted records living in shared dataset when clicking on list row

When a record is activated, the listview will do some jiggling around
assigning the ids of internal dataset to the one shared between all
views, this is mostly for the case where one switches from a "grouped"
list view, so the form view only cycles on the "current" group.

Problem is, that internal dataset is not correctly synchronized with
the shared one, so when the id is removed from the shared dataset it
is *not* removed from the internal one(s), and when the switch is made
the ids from the internal dataset are set on the shared one and
reintroduce the deleted record, leading to the form view's incorrect
state.

Fix the issue by updating the dataset's ids list when a record is
deleted from the records tree.

Also extracted some stuff from DataSetSearch's unlink callback so it
can be overridden and is more stable across datasets.

lp bug: https://launchpad.net/bugs/1161210 fixed

bzr revid: xmo@openerp.com-20130416152000-06dbwkgdb8zlf9pc
addons/web/static/src/js/data.js
addons/web/static/src/js/view_list.js