Scenario:
- set a quotation template on a quotation that adds lines ordered with
a sequence (eg. 3 lines with sequences 10, 11, 12)
- add lines in this quotation
- save
Issue:
The added lines have sequence 10 and the seen order changes.
This is caused by 6f11060d6afd9edce904dd34a2d415a2a2461108 that tries to
mitigate a more rare issue when there is more than one page of lines.
Solution:
Reverting the previous fix, and setting the sequence of the first line
to -99:
- when resequencing the first page, the sequence will be -99 to -60 =>
records from the second page will not get in the first page
- new lines will be added at the end
Issues still present:
- when resequencing the second page, item from 3 pages get into it (it
was already the case before 6f11060d6afd9edce904dd34a2d415a2a2461108)
- when adding a new line (without resequencing), it is added at the end
and not at the beginning of the next page
But those are just behavior in any list view (as is the original issue
of 6f11060d6afd9edce904dd34a2d415a2a2461108, but since it was partially
fixed for a year, this patch try to give an in-between solution instead
of just reverting it).
opw-2833913
closesodoo/odoo#120047
X-original-commit: 621454fac58e6d079ec6dc52795548c3dadea0e5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>