diff options
| author | Thibault Delavallée <tde@openerp.com> | 2014-08-14 11:29:00 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2014-08-14 11:29:00 +0200 |
| commit | a574f83b0bb9c53bada04c5e7e4bc343fa1cd631 (patch) | |
| tree | f4ba0b2d8f013fed6025d76988db0f0e51d9f1c9 /addons/mail/mail_mail.py | |
| parent | bb30c858b329f5c6f7252453a5a984d4f892346b (diff) | |
[FIX] mail, mass_mailing: do not add a link to access the document
when the email is not a notification, or not an email usign the automatic
threading. This means that when doing mass mailing with a fixed reply_to
there won't be any link to access the original document, which is what
we want. Otherwise when mailing partners, they have a link to access
their own partner profile, which does not make sense.
Diffstat (limited to 'addons/mail/mail_mail.py')
| -rw-r--r-- | addons/mail/mail_mail.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index cfc7a5f0099..fe931fa8ad1 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -177,8 +177,10 @@ class mail_mail(osv.Model): is to be inherited to add custom content depending on some module.""" body = mail.body_html - # generate footer - link = self._get_partner_access_link(cr, uid, mail, partner, context=context) + # generate access links for notifications or emails linked to a specific document with auto threading + link = None + if mail.notification or (mail.model and mail.res_id and not mail.no_auto_thread): + link = self._get_partner_access_link(cr, uid, mail, partner, context=context) if link: body = tools.append_content_to_html(body, link, plaintext=False, container_tag='div') return body |
