def __contains__(self, model):
        """Check if the given `model` exists on the server.

        >>> 'res.partner' in odoo.env
        True

        :return: `True` or `False`
        """
        model_exists = self._odoo.execute('ir.model', 'search',
                                          [('model', '=', model)])
        return bool(model_exists)
def __contains__ ( self , model ) : model_exists = self . _odoo . execute ( 'ir.model' , 'search' , [ ( 'model' , '=' , model ) ] ) return bool ( model_exists )
Check if the given `model` exists on the server.

        >>> 'res.partner' in odoo.env
        True

        :return: `True` or `False`