'Return the names of visible groups which have been granted
``access_mode`` on the model ``model_name``.
:rtype: list'

@api.model_cr
def group_names_with_access(self, model_name, access_mode):

    assert (access_mode in ('read', 'write', 'create', 'unlink')), 'Invalid    access    mode'
    self._cr.execute(('SELECT    c.name,    g.name\n                                                                                                                FROM    ir_model_access    a\n                                                                                                                                JOIN    ir_model    m    ON    (a.model_id=m.id)\n                                                                                                                                JOIN    res_groups    g    ON    (a.group_id=g.id)\n                                                                                                                                LEFT    JOIN    ir_module_category    c    ON    (c.id=g.category_id)\n                                                                                                                WHERE    m.model=%s    AND    a.active    IS    TRUE    AND    a.perm_' + access_mode), (model_name,))
    return [(('%s/%s' % x) if x[0] else x[1]) for x in self._cr.fetchall()]
