diff options
Diffstat (limited to 'addons/mail/static/src/js/mail.js')
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index e3f813bfa47..269187df8cd 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -725,6 +725,7 @@ openerp.mail = function (session) { var values = { 'body': this.$('textarea').val(), 'subject': false, + 'parent_id': this.context.default_parent_id, 'attachment_ids': _.map(this.attachment_ids, function (file) {return file.id;}), 'partner_ids': partner_ids, 'context': _.extend(this.parent_thread.context, { @@ -833,7 +834,9 @@ openerp.mail = function (session) { // go to the parented message 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()); + if(parent_message){ + var messages = [parent_message].concat(parent_message.get_childs()); + } } 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());}); @@ -1799,15 +1802,17 @@ openerp.mail = function (session) { 'read_action': 'unread', 'show_record_name': false, 'show_compact_message': 1, + 'display_log_button' : true, }, this.node.params); - if (this.node.attrs.placeholder) { this.node.params.compose_placeholder = this.node.attrs.placeholder; } if (this.node.attrs.readonly) { this.node.params.readonly = this.node.attrs.readonly; } - + if ('display_log_button' in this.options) { + this.node.params.display_log_button = this.options.display_log_button; + } this.domain = this.node.params && this.node.params.domain || []; if (!this.ParentViewManager.is_action_enabled('edit')) { |
