def METHOD_NAME(self):
    title = self.title if self.title else '%s' % _('Untitled document')
    if self.url:
        return '<a href="{0}">{1}</a>'.format(self.url, title)
    elif self.document:
        return '<a href="{0}">{1}</a>'.format(self.document.url, title)
    else:
        return title