[FIX] mail: append messages at the right place
authorJulien Legros <jle@odoo.com>
Fri, 24 Oct 2014 14:40:25 +0000 (16:40 +0200)
committerJulien Legros <jle@odoo.com>
Fri, 24 Oct 2014 15:46:33 +0000 (17:46 +0200)
e6790ba introduced a bug where messages were always appended at the end
of the thread, potentially displaying them in the wrong order.

addons/mail/static/src/js/mail.js

index 80dacd6..099af49 100644 (file)
@@ -880,7 +880,7 @@ openerp.mail = function (session) {
             self.parent_thread.message_fetch(this.domain, this.context, false, function (arg, data) {
                 self.id = false;
                 // insert the message on dom after this message
-                self.parent_thread.switch_new_message( data, self.$el.parent() );
+                self.parent_thread.switch_new_message(data, self.$el);
                 self.animated_destroy(200);
             });