Thursday, February 16, 2012

How to Know the Version of OpenERP


I know, you might have this question in your mind to know the version of Installed OpenERP in your system.

This is very easy by using the code as follows.
#!/usr/bin/env python
from xmlrpclib import ServerProxy
def get_version(hostname, port=8069):
    server = ServerProxy('http://%s:%d/xmlrpc/db' % (hostname, port,))
    return server.server_version()

def main():
    print "Version: %r" % (get_version('localhost'),)

if __name__ == '__main__':
    main() 
Thanks to Stephane Wirtel for sharing it!

No comments: