diff options
| author | Denis Ledoux <dle@openerp.com> | 2014-06-01 21:27:55 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@openerp.com> | 2014-06-01 21:27:55 +0200 |
| commit | 97c0dbcd0ad6fd930c065f5fa873b86de1190e24 (patch) | |
| tree | 993ee551152b1ad667eb0cda89e8bf4767ff9c0c /addons/mail/wizard/mail_compose_message.py | |
| parent | 9d33ce4900c124c07f39ea1369649d4e03b75623 (diff) | |
[FIX] mail: do not link email to a model/res_id if this model doesn't support new message
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index e14a8f3dfe5..cb068d566c1 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -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') |
