diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index bac87753574..858256ff476 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -597,11 +597,6 @@ openerp.mail = function(session) { this.$el.toggle(this.view.get("actual_mode") !== "create"); }, - destroy: function() { - if (this.thread) { this.thread.destroy(); } - this._super.apply(this, arguments); - }, - set_value: function() { var self = this; this._super.apply(this, arguments); @@ -617,13 +612,11 @@ openerp.mail = function(session) { var domain = this.options.domain.concat([['model', '=', this.view.model], ['res_id', '=', this.view.datarecord.id]]); // create and render Thread widget this.$el.find('div.oe_mail_recthread_main').empty(); - if (this.thread) { this.thread.destroy(); } var thread = new mail.Thread(self, { 'context': this.options.context, 'domain': domain, 'message_ids': this.get_value(), // display 'thread_level': this.options.thread_level, 'show_header_compose': true, 'show_delete': true, 'composer': true, }); - this.thread = thread; return thread.appendTo(this.$el.find('div.oe_mail_recthread_main')); }, }); @@ -666,11 +659,6 @@ openerp.mail = function(session) { return (search_view_ready && thread_displayed); }, - destroy: function () { - if (this.thread) this.thread.destroy(); - this._super.apply(this, arguments); - }, - /** * Load the mail.message search view * @param {Object} defaults ?? @@ -716,7 +704,7 @@ openerp.mail = function(session) { message_display: function () { var domain = this.options.domain.concat(this.search_results['domain']); var render_res = session.web.qweb.render('mail.wall_thread_container', {}); - $('