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); },