I need to display in the treeview the last message inserted in the log notes. Does anyone know how to do it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
2
Replies
1644
Views
you can do that a few different ways. If it your custom model you can do it in python:
_order = 'create_date desc'
But that will make them ordered like that in every view.
You can do it in the view definition, but I'm not sure if you have to have that field in the view like using it in a domain, then you can just add the field and make it invisible.
<tree default_order="create_date desc">
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
create a new compute field to store the last message and display it in tree view.