[FIX] records disappearing from sequenceable list views when dropped onto their origi...
authorXavier Morel <xmo@openerp.com>
Tue, 6 Dec 2011 12:37:35 +0000 (13:37 +0100)
committerXavier Morel <xmo@openerp.com>
Tue, 6 Dec 2011 12:37:35 +0000 (13:37 +0100)
commitc58ebcfaeddf5b6dfbbd8baed785fa8045919009
treeaddbdf3c03687c95cac54f991f73b7a2b0e4ae42
parentee6841e510a14b4889f1695e6f916766ee20025c
[FIX] records disappearing from sequenceable list views when dropped onto their original position

In the listview's backing Records, a noop set (setting a property to
the value it already has) has no visible effect (no even is triggered,
it is simply ignored).

The listview relies on setting the sequence number to refresh records
and re-display them correctly in their table rows, but dropping an
already sequenced row onto itself would set its sequence to its
current value (barring record removals), yielding to no refresh and
the row simply poofing out of view as it gets removed from the
collection (and the table), then added back to the collection in its
new (and old) position and displayed in a bare-bones empty states
waiting for a render_record call.

Added a check to sorting management to bail out immediately if a sort
is a noop (the row is dropped at the same position it was taken from)

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

bzr revid: xmo@openerp.com-20111206123735-4bfnqh1zl7u4ozm9
addons/web/static/src/js/view_list.js