I heard adding "_order = 'default_order_field_wanted desc'" to the object in the TreeView supposebly works. But for me it doesn't, I just get a ValidateError.
What is the correct way to sort a list by default? (For instance on partner name)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I heard adding "_order = 'default_order_field_wanted desc'" to the object in the TreeView supposebly works. But for me it doesn't, I just get a ValidateError.
What is the correct way to sort a list by default? (For instance on partner name)
Hi this must be work
add it with _name
and columns
like :
_name = 'name.of.the.object'
_order = 'date_order desc'
and you can also clicking on columns of tree view
get sorted records
Thanks
Sandeep
Take care on, modification file, if u can order partners, u need to modifie the /addons/base/res/res_partner.py, and not the /addons/crm/res_partner.ps .. just for example!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
It must work! Check your code. Field must be define in
tree
form (XML). Also try restart server.