Revision: 16211
Updated Code
at July 29, 2009 06:03 by JustGreg
Updated Code
username = 'admin' #the user pwd = 'admin' #the password of the user dbname = 'terp' #the database # Get the uid sock_common = xmlrpclib.ServerProxy ('http://localhost:8069/xmlrpc/common') uid = sock_common.login(dbname, username, pwd) #replace localhost with the address of the server sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object') partner = { 'name': 'Fabien Pinckaers', 'lang': 'fr_FR', } partner_id = sock.execute(dbname, uid, pwd, 'res.partner', 'create', partner) address = { 'partner_id': partner_id, 'type' : 'default', 'street': 'Chaussée de Namur 40', 'zip': '1367', 'city': 'Grand-Rosière', 'phone': '+3281813700', 'fax': '+3281733501', } address_id = sock.execute(dbname, uid, pwd, 'res.partner.address', 'create', address)
Revision: 16210
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 29, 2009 06:02 by JustGreg
Initial Code
username = 'admin' #the user pwd = 'admin' #the password of the user dbname = 'terp' #the database # Get the uid sock_common = xmlrpclib.ServerProxy ('http://localhost:8069/xmlrpc/common') uid = sock_common.login(dbname, username, pwd) #replace localhost with the address of the server sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object') partner = { 'name': 'Fabien Pinckaers', 'lang': 'fr_FR', } partner_id = sock.execute(dbname, uid, pwd, 'res.partner', 'create', partner) address = { 'partner_id': partner_id, 'type' : 'default', 'street': 'Chauss�©e de Namur 40', 'zip': '1367', 'city': 'Grand-Rosi�¨re', 'phone': '+3281813700', 'fax': '+3281733501', } address_id = sock.execute(dbname, uid, pwd, 'res.partner.address', 'create', address)
Initial URL
http://doc.openerp.com/developer/6_22_XML-RPC_web_services/
Initial Description
Initial Title
OpenERP: XML-RPC Web services
Initial Tags
Initial Language
Python