[FIX] mail: do no pop reply_to if same thread or post in the document is false

Otherwiwse if same thread is checked and post not, the reply_to is forced to the user email to avoid the email to be regarded as private without having a parent mail (has the parent is not posted in the thread), which is not what is expected

bzr revid: dle@openerp.com-20140210092301-1bdyvdwgekwgo9rh
This commit is contained in:
Denis Ledoux 2014-02-10 10:23:01 +01:00
parent c2b51ee58a
commit bd0f05690c
1 changed files with 3 additions and 3 deletions

View File

@ -323,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: