From 863c7f421d23af8b12cab1577aed1fb3eb22f182 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 20 Dec 2012 16:46:04 +0100 Subject: [PATCH] [IMP] mail: option to don't display email_from partners on the top composer bzr revid: chm@openerp.com-20121220154604-f6zvrbrqxjawropq --- addons/mail/static/src/js/mail.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index a770b07be17..5b574eada65 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -638,8 +638,8 @@ openerp.mail = function (session) { var message = this.parent_thread.parent_message; var parent_message = message.parent_id ? message.parent_thread.parent_message : message; var messages = [parent_message].concat(parent_message.get_childs()); - } else { - // get all wall messages + } else if (this.options.emails_from_on_composer) { + // get all wall messages if is not a mail.Wall _.each(this.options.root_thread.messages, function (msg) {messages.push(msg); messages.concat(msg.get_childs());}); } @@ -1479,6 +1479,7 @@ openerp.mail = function (session) { 'message_ids': undefined, 'compose_as_todo' : false, 'readonly' : false, + 'emails_from_on_composer': true, }, this.action.params); this.action.params.help = this.action.help || false; @@ -1643,6 +1644,7 @@ openerp.mail = function (session) { 'show_record_name': true, 'show_compact_message': this.action.params.view_mailbox ? false : 1, 'view_inbox': false, + 'emails_from_on_composer': false, }, this.action.params); },