'Returns (model, res_id) corresponding to a given module and xml_id (cached), if and only if the user has the necessary access rights
to see that object, otherwise raise a ValueError if raise_on_access_error is True or returns a tuple (model found, False)'

@api.model
def check_object_reference(self, module, xml_id, raise_on_access_error=False):

    (model, res_id) = self.get_object_reference(module, xml_id)
    if self.env[model].search([('id', '=', res_id)]):
        return (model, res_id)
    if raise_on_access_error:
        raise AccessError(('Not    enough    access    rights    on    the    external    ID:    %s.%s' % (module, xml_id)))
    return (model, False)
