Steps to reproduce the issue:
- Notes app > Kanban view > Create a bunch of notes using
the + icon in the kanban view
- (optional) Modify the default order of the notes
- Add a new note using the quick add feature
- Don't modify the order of the notes and refresh the page
- The new note will be sent to the bottom of the note list
(off-screen if the list is long enough)
This happens because new notes have their sequence set to NULL, which
places them at the end of the list after ordering by sequence.
This commit sets the default sequence of a new note to 0, so that it
is placed at the top of the list and adds an additional sort on
'id desc' to consider the case where all notes have the same sequence.
opw-2924615
closesodoo/odoo#98427
X-original-commit: ec719b166635df9ed31c9c2b47fedadd2311765c
Signed-off-by: stcc-odoo <stcc@odoo.com>