diff options
| author | Thibault Delavallée <tde@openerp.com> | 2013-12-06 11:17:16 +0100 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2013-12-06 11:17:16 +0100 |
| commit | 1037874e15061d4775214d02c3ade98ac46ecd32 (patch) | |
| tree | 1364cdf65259a70260ec18ff5f2745c980aead43 /addons | |
| parent | 1e5432edecf88ac86d1d9c057c4aa10112e59f70 (diff) | |
[CLEAN] mail: removed modifications that have nothing to do with website in mail.js + typo introduced in a test file
bzr revid: tde@openerp.com-20131206101716-08q6f4ufhj50e239
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/email_template/wizard/mail_compose_message.py | 5 | ||||
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 1 | ||||
| -rw-r--r-- | addons/mail/tests/common.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py index ac2f79b56f1..4c1e19abbe9 100644 --- a/addons/email_template/wizard/mail_compose_message.py +++ b/addons/email_template/wizard/mail_compose_message.py @@ -42,12 +42,11 @@ class mail_compose_message(osv.TransientModel): _inherit = 'mail.compose.message' def default_get(self, cr, uid, fields, context=None): - """ - """ + """ Override to pre-fill the data when having a template in single-email mode """ if context is None: context = {} res = super(mail_compose_message, self).default_get(cr, uid, fields, context=context) - if context.get('default_template_id'): + if res.get('composition_mode') != 'mass_mail' and context.get('default_template_id'): res.update( self.onchange_template_id( cr, uid, [], context['default_template_id'], res.get('composition_mode'), diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index b2d5e7e7f0c..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, { diff --git a/addons/mail/tests/common.py b/addons/mail/tests/common.py index b7a5a510409..68a329e043a 100644 --- a/addons/mail/tests/common.py +++ b/addons/mail/tests/common.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Business Applications -# Copyright (c) 20123TODAY OpenERP S.A. <http://www.openerp.com> +# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as |
