diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index bf57342f14f..b43b7d19b85 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -317,6 +317,7 @@ class email_template(osv.osv): 'message_id': False, 'state': 'outgoing', 'content_subtype': 'plain', + 'partner_ids': [], } if not template_id: return values diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 47908ab3223..da6816d3441 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -16,7 +16,7 @@ openerp.mail = function(session) { session.web.FormView = session.web.FormView.extend({ do_action: function(action, on_close) { - if (action.res_model == 'mail.compose.message' && this.fields && this.fields.message_ids) { + if (action.res_model == 'mail.compose.message' && this.fields && this.fields.message_ids && this.fields.message_ids.view.get("actual_mode") != 'create') { var record_thread = this.fields.message_ids; var thread = record_thread.thread; thread.instantiate_composition_form('comment', true, false, 0, action.context);