If I remember correctly, when using “account moves”, I could sort entries by number. Most useful was a descending order, so I found most recent entries at the top of the list and could copy the number to invoice sheets and bank account statement.
Since 6.4 (maybe 6.2, I skipped that version), my entries are no longer sorted as actual numbers (1, 2, … 10, 11, …, 20, 21…) , but by first digit, so actually I find an order as 108, 1080, 1081, 1082, …, 109, 1090, 1091 etc. I don’t think, this is very useful behaviour, as my most recent entries tend to be in the middle of the list.
Is it a setting I messed up - or do I have another may to clean that up?
In 6.4 I also have the same problem with for example the sales number, which are sorted alphabetically.
Of course, I rectified this by padding the sequence for new sales with zero, but then I had the old sales left, in which case I went and padded these as well with zero in sql - a bit dangerous operation - always back up before using sql in production database.
I wanted to express that I have the same problem that you have.
I am interested in how other people have solved this problem, if there is a setting I (we) are unaware of, or if indeed a patch is required.
You are right that the solution I have is not a proper one, but I have seen zero padded numbers on very many supplier documents, and sorting might be the reason. If many people are doing it this way, it might be the right way, better have some input from more experienced Tryton users/developers.
We are all dummies until we understand how something works
What I did is this:
In Administration / Sequences / Sequences:
Open sequence you are interested in.
In the field Number padding write how many digits you want your number to have. If you expect to create 9999 records, then you should write 4. If the next number is for ex. 10, then the record number will be 0010, this way you can sort correctly as long as you do not exceed 9999.
This of course does not solve the problem for the existing records.
As I said, I am also looking for advice from more experienced users/developers.
Then the solution is to just unsort the list and it will be in chronological order.
First time you click the column it sorts ascending, then descending, and the third it removes sorting.
That problem happens everywhere a sequence is used.
For example, invoices are sorted by alphabetical order of the invoice number when the list is not sorted by a column. So in my list of client invoices, I have FAC2022-5x (x from 9 to 0), then FAC2022-5, then FAC2022-4x,… I could pad the numbers, but that’s bad design: what happens if/when I overflow ?
And if I sort by a column, say date for example, all the invoices for the same date are randomly arranged.
I think that sequence columns should be sorted alphabetically on the prefix, then numerically on the increment.