Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use web-services in OpenERP/Odoo?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 130
    Comment on it

    If you want to use WebServices in OpenERP(Odoo) follow the below mentioned code and paste it in your WebServices XML-RPC file:

    import xmlrpclib
     define HOST, PORT, DB, USER, PASS
    url = 'http://%s:%d/xmlrpc/common' % (HOST,PORT)
    sock = xmlrpclib.ServerProxy(url)
    uid = sock.login(DB,USER,PASS)
    print "Logged in as %s (uid:%d)" % (USER,uid)
    Create a new idea
    url = 'http://%s:%d/xmlrpc/object' % (HOST,PORT)
    sock = xmlrpclib.ServerProxy(url)
    args = {
    'name' : 'Another idea',
    'description' : 'This is another idea of mine',
    'inventor_id': uid,
    }
    idea_id = sock.execute(DB,uid,PASS,'idea.idea','create',args)

    Note-> OpenERP is accessible through XML-RPC interfaces, for which libraries exist in many languages

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: