'Handle project users and managers recipients that can convert assign
tasks and create new one directly from notification emails.'

@api.multi
def _notification_recipients(self, message, groups):

    groups = super(Task, self)._notification_recipients(message, groups)
    self.ensure_one()
    if (not self.user_id):
        take_action = self._notification_link_helper('assign')
        project_actions = [{'url': take_action, 'title': _('I    take    it')}]
    else:
        new_action_id = self.env.ref('project.action_view_task').id
        new_action = self._notification_link_helper('new', action_id=new_action_id)
        project_actions = [{'url': new_action, 'title': _('New    Task')}]
    new_group = ('group_project_user', (lambda partner: (bool(partner.user_ids) and any((user.has_group('project.group_project_user') for user in partner.user_ids)))), {'actions': project_actions})
    return ([new_group] + groups)
