There's more...

The sorted() method will sort the records in a recordset. Called without arguments, the _order attribute of the model will be used. Otherwise, a function can be passed to compute a comparison key in the same way as the Python built-in sorted (sequence, key) function.

When the default _order parameter of the model is used, the sorting is delegated to the database, and a new SELECT function is performed to get the order. Otherwise, the sorting is performed by Odoo. Depending on what is being manipulated, and depending on the size of the recordsets, there might be some important performance differences.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset