From 1e31376e714063e307eb5b68e151f0f2151408ae Mon Sep 17 00:00:00 2001 From: Valerie Pirenne Date: Wed, 17 Jun 2015 09:29:55 +0200 Subject: [PATCH] [FIX] mail: default_model and default_res_id in chatter --- addons/mail/static/src/js/mail.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 21ac9d5e171..1c9549f3b36 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -352,12 +352,8 @@ var MailThread = Attachment.extend ({ this.partner_ids.push(this.parent_message.author_id); } - if (!this.root) { - this.context = _.extend(this.context, { - 'default_model': this.parent_message.model, - 'default_res_id': this.parent_message.res_id, - }); - } + this.context.default_model = this.parent_message.model || this.context.default_model; + this.context.default_res_id = this.parent_message.res_id || this.context.default_res_id; this.options.root_thread = this.options.root_thread != undefined ? this.options.root_thread : this; this.options.show_compose_message = this.root ? false : this.options.root_thread.view.options.show_compose_message;