[FIX] mail: auto_delete option on email notification

When writing a message via the chatter with a template being in auto_delete
False, the notifications emails are always in auto_delete True.

This fix propagate the auto_delete option of a mail.template to these
notifications emails.

opw-630010
This commit is contained in:
Nicolas Lempereur 2015-03-27 14:51:00 +01:00
parent 497ce299e9
commit c21480a3d1
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ class mail_notification(osv.Model):
for chunk in chunks:
mail_values = {
'mail_message_id': message.id,
'auto_delete': True,
'auto_delete': (context or {}).get('mail_auto_delete', True),
'body_html': body_html,
'recipient_ids': [(4, id) for id in chunk],
'references': references,