From f00bb6ee8a645aab28c80113fa66bc809bf5f66f Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 29 May 2012 16:24:20 +0530 Subject: [PATCH] [IMP] set sequence of chatter messages bzr revid: kjo@tinyerp.com-20120529105420-2s1inbo4ehv9mgkx --- addons/mail/mail_thread.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 1ed3e74fe5a..92daccfba6d 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -413,7 +413,9 @@ class mail_thread(osv.osv): """ OpenChatter feature: return thread messages """ msg_ids = self.message_load_ids(cr, uid, ids, limit, offset, domain, ascent, root_ids, context=context) - return self.pool.get('mail.message').read(cr, uid, msg_ids, context=context) + msgs=self.pool.get('mail.message').read(cr, uid, msg_ids, context=context) + msgs= sorted(msgs, key=lambda d: (-d['id'])) + return msgs def get_pushed_messages(self, cr, uid, ids, limit=100, offset=0, msg_search_domain=[], ascent=False, root_ids=[], context=None): """ OpenChatter: wall: get messages to display (=pushed notifications)