There was an issue when canceling the move of an article from one section to
another: a previous move which was not canceled could be undone when it should
not have been.
Impacted versions:
* 15.4+
Steps to reproduce:
1. Have one article (A) in the "workspace" section and one article (B) in the
"private" section
2. move (A) into "private", validate the move in the dialog
3. move (B) into "workspace", discard the move in the dialog
Current behavior:
* (A) is displayed as if it is currently in "workspace" but it is in fact
still in "private"
Expected behavior:
* (A) and (B) should be displayed in the "private" section
This commit fixes the problem by manually replacing the article whose move was
discarded (B) at its previous position while triggering a "change" event instead
of a "cancel" event.
The bug is caused by an incorrect implementation of the "cancel" handler in
`jquery.mjs.nestedSortable` library. Since this library uses jQuery and it is
discontinued, we should consider to reimplement the feature internally in the
future.
This commit also synchronizes data-attr attributes (parent-id and section) with
the hidden value data('attr') from jQuery for consistency.
Task-2877766
closesodoo/odoo#93244
X-original-commit: 98aaeb32e04f99c06c75166593e3b89c4aa087df
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>