'Checks whether user belongs to given group.
:param str group_ext_id: external ID (XML ID) of the group.
Must be provided in fully-qualified form (``module.ext_id``), as there
is no implicit module to use..
:return: True if the current user is a member of the group with the
given external ID (XML ID), else False.'

@api.model
@tools.ormcache('self._uid', 'group_ext_id')
def _has_group(self, group_ext_id):

    assert (group_ext_id and ('.' in group_ext_id)), 'External    ID    must    be    fully    qualified'
    (module, ext_id) = group_ext_id.split('.')
    self._cr.execute('SELECT    1    FROM    res_groups_users_rel    WHERE    uid=%s    AND    gid    IN\n                                                                                                                (SELECT    res_id    FROM    ir_model_data    WHERE    module=%s    AND    name=%s)', (self._uid, module, ext_id))
    return bool(self._cr.fetchone())
