diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index b8c19168227..320e63858ec 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -129,22 +129,29 @@ class mail_thread(osv.AbstractModel): if alias_ids and len(alias_ids) == 1: alias = alias_obj.browse(cr, uid, alias_ids[0], context=context) - if alias: - alias_email = alias.name_get()[0][1] - return _("""
- Click here to add new %(document)s or send an email to: %(email)s -
- %(static_help)s""" - ) % { - 'document': document_name, - 'email': alias_email, - 'static_help': help or '' - } + add_arrow = not help or help.find("oe_view_nocontent_create") == -1 - if document_name != 'document' and help and help.find("oe_view_nocontent_create") == -1: - return _("Click here to add new %(document)s
%(static_help)s") % { - 'document': document_name, - 'static_help': help or '', + if alias: + email_link = "%(email)s" % {'email': alias.name_get()[0][1]} + if add_arrow: + return _("""+ Click here to add new %(document)s or send an email to: %(email)s. +
+ %(static_help)s""" + ) % { + 'document': document_name, 'email': email_link, 'static_help': help or '' + } + + return _("""%(static_help)s ++ You could also add a new %(document)s by sending an email to: %(email)s. +
""") % { + 'document': document_name, 'email': email_link, 'static_help': help or '' + } + + if add_arrow: + return _("Click here to add new %(document)s
%(static_help)s") % { + 'document': document_name, 'static_help': help or '' } return help