def is_initialized(cr):
 cr.execute("SELECT relname FROM pg_class WHERE relkind='r' AND relname='ir_module_module'")
 return (len(cr.fetchall()) > 0)

def is_initialized ( cr ) : cr . execute ( "SELECT relname FROM pg_class WHERE relkind='r' AND relname='ir_module_module'" ) return ( len ( cr . fetchall ( ) ) > 0 )
check if a database has been initialized for the orm .