[FIX] website_project_issue: Don't always display 'View Issue'

This override was always sending the document to all the recipients.
If the user is only a follower, he sees the button but cannot access
to My Account as he's not a user.
This commit is contained in:
Yannick Tivisse
2016-03-07 14:24:18 +01:00
parent 271840a282
commit 0c2bbf6da6
@@ -19,14 +19,3 @@ class Issue(models.Model):
'target': 'self',
'res_id': self.id,
}
@api.multi
def _notification_get_recipient_groups(self, message, recipients):
""" Override to set the access button: everyone can see an access button
on their notification email. It will lead on the website view of the
post. """
res = super(Issue, self)._notification_get_recipient_groups(message, recipients)
access_action = self._notification_link_helper('view', model=message.model, res_id=message.res_id)
for category, data in res.iteritems():
res[category]['button_access'] = {'url': access_action, 'title': _('View Issue')}
return res