domain: server
language: python
class Item class
Use the set_order_by
method to define and store internally the order_by
parameter that will be used by the
open
method, when its own order_by
parameter is not specified. The
open
method clears internally stored parameter value.
You can specify the fields as a list, the way the set_order_by method on the client does or as non-keyworded arguments.
If there is a sign ‘-‘ before a field name, then on this field records will be sorted in decreasing order.
The result of the execution of following code snippets will be the same:
item.open(order_by=['customer', '-invoicedate'])
item.set_order_by('customer', '-invoicedate')
item.open();
item.set_order_by(['customer', '-invoicedate'])
item.open();