This question has been flagged
2 Replies
3123 Views

I need to know if e.g. lines taken from line_ids field are always returned in the same order on the list or is it random/undefined.

Avatar
Discard
Best Answer

It should return according to the model order of order line in default or according to the fetching query or orm methods .

Avatar
Discard
Best Answer

In the PyObject model, if the order is defined, then the retrieval of records will follow according to it. (Same will be reflected in Tree View, unless otherwise is defined)

If none defined, then by default, the order of retrieving  the record will be based on the database-ID.


Note: The records shown in the List/Tree view will be always in-lieu with the Model's Order, however its order can be changed in XML views, which will be considered only in UI level, hence it won't alter the retrieval order when fetched in your code.

 

Avatar
Discard