diff options
| author | Christophe Simonis <chs@openerp.com> | 2014-02-20 17:38:15 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2014-02-20 17:38:15 +0100 |
| commit | 4b72678bc74906e552ebc8cace7161901571d2c1 (patch) | |
| tree | d4965fd90f45af167c6a34eec3caad111a309f12 /addons/mail/wizard/mail_compose_message.py | |
| parent | 65db3c635eea5324676c8f85d13e0058d66ce1b9 (diff) | |
| parent | d5106a4d34a9b7c52a1ecad7c65331f1fda2e231 (diff) | |
[MERGE] forward port of branch saas-2 up to revid 9195 chs@openerp.com-20140220154517-6y531n1mqtnfnsmr
bzr revid: chs@openerp.com-20140220163815-69sza1kclnh5mavs
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 74aea3dfc01..2d09a925ca7 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -130,7 +130,7 @@ class mail_compose_message(osv.TransientModel): 'wizard_id', 'attachment_id', 'Attachments'), 'filter_id': fields.many2one('ir.filters', 'Filters'), } - + #TODO change same_thread to False in trunk (Require view update) _defaults = { 'composition_mode': 'comment', 'body': lambda self, cr, uid, ctx={}: '', @@ -268,6 +268,8 @@ class mail_compose_message(osv.TransientModel): 'mail.message', 0, context=context) mail_values['attachment_ids'] = m2m_attachment_ids + if not mail_values.get('reply_to'): + mail_values['reply_to'] = mail_values['email_from'] self.pool.get('mail.mail').create(cr, uid, mail_values, context=context) else: subtype = 'mail.mt_comment' @@ -321,10 +323,10 @@ class mail_compose_message(osv.TransientModel): if email_dict.get('email_from'): mail_values['email_from'] = email_dict.pop('email_from') # replies redirection: mass mailing only - if not wizard.same_thread: - mail_values['reply_to'] = email_dict.pop('reply_to', None) - else: + if wizard.same_thread and wizard.post: email_dict.pop('reply_to', None) + else: + mail_values['reply_to'] = email_dict.pop('reply_to', None) mail_values.update(email_dict) # mass mailing without post: mail_mail values if mass_mail_mode and not wizard.post: |
