Skip to content
Snippets Groups Projects
Commit 97c0dbcd authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] mail: do not link email to a model/res_id if this model doesn't support new message

parent 9d33ce49
Branches
Tags
No related merge requests found
......@@ -267,7 +267,10 @@ class mail_compose_message(osv.TransientModel):
# mass mailing: rendering override wizard static values
if mass_mail_mode and wizard.model:
# always keep a copy, reset record name (avoid browsing records)
mail_values.update(notification=True, model=wizard.model, res_id=res_id, record_name=False)
mail_values.update(notification=True, record_name=False)
if hasattr(self.pool[wizard.model], 'message_new'):
mail_values['model'] = wizard.model
mail_values['res_id'] = res_id
# auto deletion of mail_mail
if 'mail_auto_delete' in context:
mail_values['auto_delete'] = context.get('mail_auto_delete')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment