Jam.py documentation

set_order_by

set_order_by(field_list)

domain: client

language: javascript

class Item class

Description

Use the set_order_by method to define and store internally the order_by option that will be used by the open method, when its own order_by option is not specified. The open method clears internally stored parameter value.

The field_list parameter is a list of field names. If there is a sign ‘-‘ before a field name, then on this field records will be sorted in decreasing order.

Example

The result of the execution of following code snippets wil be the same:

item.open({order_by: ['-invoicedate']});
item.set_order_by(['-invoicedate']);
item.open();

See also

Dataset

open