Is there a way when you make a call to the xml rpc webservice to have the obtained records sorted in ascending/descending order?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Use the order argument:
order="date" (if not specified, defaults to be ASC)
order="name DESC"
Model.search (domain[, offset=0][, limit=None][, order=None][, count=False])[source]
Searches for records based on the domain search domain.
Parameters
domain – A search domain. Use an empty list to match all records.
offset (int) – number of results to ignore (default: none)
limit (int) – maximum number of records to return (default: all)
order (str) – sort string
count (bool) – if True, only counts and returns the number of matching records (default: False)
Returns: at most limit records matching the search criteria
Raises: AccessError – if user is not allowed to access requested information
Hello Olivier Biltris,
Please find code in comment.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
You can use bellow example
In the search record for a partner, you can add orders like order id desc or asc.
models.execute_kw(db, uid, password,
'res.partner', 'search_read',
[[['is_company', '=', True], ['customer', '=', True]]],
{'fields': ['name', 'country_id', 'comment'], 'order': 'id desc'})
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden