[FIX] web: resequence after draft (re-enable test)

When e61639723d was forward-ported, there was an adapatation in 12.3
version with bbc8c9fc2 so the test pass (because of another issue where
if a line is moved after the draft line, the code tried to discard the
moved line and not the draft line).

The same adaptation is necessary in saas-12.4 but since the code changed
amply, the test was temporarily just skipped (in 83d0eaedc7).

With this changeset, the adaptation is forward-ported from saas-12.3 to
saas-12.4 and the test is re-enabled.

opw-1966589
closes #34277

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
Nicolas Lempereur
2019-06-20 11:05:32 +00:00
parent 514ecd7563
commit 09a9c48180
2 changed files with 6 additions and 1 deletions
@@ -795,6 +795,11 @@ ListRenderer.include({
helper: 'clone',
handle: '.o_row_handle',
stop: function (event, ui) {
// update currentID taking moved line into account
if (self.currentRow !== null) {
var currentID = self.state.data[self.currentRow].id;
self.currentRow = self._getRow(currentID).index();
}
self.unselectRow().then(function () {
self._moveRecord(ui.item.data('id'), ui.item.index());
});
+1 -1
View File
@@ -8159,7 +8159,7 @@ QUnit.module('Views', {
form.destroy();
});
QUnit.skip('resequence list lines when discardable lines are present', async function (assert) {
QUnit.test('resequence list lines when discardable lines are present', async function (assert) {
assert.expect(8);
var onchangeNum = 0;