From aeecd20324c4405ec2f79cb919e9d04e43a00db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 16 Nov 2012 11:21:43 +0100 Subject: [PATCH] [FIX] mail: fixed a bug when replying to a private message, leading to a non-existent thread dataset. Should be mail.thread by default, only for the dataset, not anything else I think. bzr revid: tde@openerp.com-20121116102143-jq2o0e5by76zv12w --- addons/mail/static/src/js/mail.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 94ac6b782f4..70cfe5a9dd0 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1012,7 +1012,7 @@ openerp.mail = function (session) { // object compose message this.compose_message = false; - this.ds_thread = new session.web.DataSetSearch(this, this.context.default_model); + this.ds_thread = new session.web.DataSetSearch(this, this.context.default_model || 'mail.thread'); this.ds_message = new session.web.DataSetSearch(this, 'mail.message'); }, @@ -1286,6 +1286,7 @@ openerp.mail = function (session) { */ switch_new_message: function (records, dom_insert_after) { var self=this; + console.log(records); _(records).each(function (record) { var thread = self.browse_thread({ 'id': record.parent_id,