[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
This commit is contained in:
Thibault Delavallée 2012-11-16 11:21:43 +01:00
parent 101b1003b1
commit aeecd20324
1 changed files with 2 additions and 1 deletions

View File

@ -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,