[IMP] mail: dynamic_help
bzr revid: chm@openerp.com-20130320134116-6drwq1wd0u11x77m
This commit is contained in:
@@ -98,7 +98,7 @@ class mail_thread(osv.AbstractModel):
|
||||
alias = object_id.alias_id and object_id.alias_id.name_get() or False
|
||||
if alias and alias[0] and alias[0][1]:
|
||||
email = alias[0][1]
|
||||
return "%s %s" % (_("<p class='oe_view_nocontent_create'>Click to add a new %s or create this by sending an email to: <a href='mailto:%s'>%s</a></p>" % (context.get('dynamic_help_documents', _("documents")), email, email)), help)
|
||||
return "%s %s" % (_("<p class='oe_view_nocontent_create'>Click here to add a new %s or send an email to: <a href='mailto:%s'>%s</a></p>") % (context.get('dynamic_help_documents', _("documents")), email, email), help)
|
||||
else:
|
||||
model_id = self.pool.get('ir.model').search(cr, uid, [("model", "=", self._name)], context=context)[0]
|
||||
alias_obj = self.pool.get('mail.alias')
|
||||
@@ -106,7 +106,11 @@ class mail_thread(osv.AbstractModel):
|
||||
if alias_ids:
|
||||
for alias in alias_obj.browse(cr, uid, alias_ids, context=context):
|
||||
email = "%s@%s" % (alias.alias_name, alias.alias_domain)
|
||||
return "%s %s" % (_("<p class='oe_view_nocontent_create'>Click to add a new %s or create this by sending an email, for example to: <a href='mailto:%s'>%s</a></p>" % (context.get('dynamic_help_documents', _("documents")), email, email)), help)
|
||||
return "%s %s" % (_("<p class='oe_view_nocontent_create'>Click here to add a new %s or send an email, for example, to: <a href='mailto:%s'>%s</a></p>") % (context.get('dynamic_help_documents', _("documents")), email, email), help)
|
||||
|
||||
if help.find("oe_view_nocontent_create") == -1:
|
||||
return "%s %s" % (_("<p class='oe_view_nocontent_create'>Click here to add a new %s</p>") % context.get('dynamic_help_documents', _("documents")), help)
|
||||
|
||||
return help
|
||||
|
||||
def _get_message_data(self, cr, uid, ids, name, args, context=None):
|
||||
|
||||
Reference in New Issue
Block a user