[FIX] web: resequence after draft (re-enable test)
Whene61639723dwas forward-ported, there was an adapatation in 12.3 version withbbc8c9fc2so 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 (in83d0eaedc7). 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:
@@ -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());
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user