i want to make chatter view order by date asc or desc form views via button,
how can i do that?
Thanks in advance
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
1
Reply
2395
Views
Hello Jay,
You can do that (
make chatter view order by date
) without button.
Override the method: [ _computeMessageViews ]
Source: addons/mail/static/src/models/thread_view/thread_view.js
Case 1 date desc:
......
for (const message of _.sortBy(orderedMessages, 'date').reverse()) {
......
Case 2 date
asc:
......
for (const message of _.sortBy(orderedMessages, 'date')) {
......
Okay thanks for the answer.