Return to Snippet

Revision: 16213
at July 29, 2009 06:08 by JustGreg


Initial Code
import xmlrpclib

sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')
uid = 1
pwd = 'demo'

partner = {
    'title': 'Monsieur',
    'name': 'Fabien Pinckaers',
    'lang': 'fr',
    'active': True,
}

partner_id = sock.execute(dbname, uid, pwd, 'res.partner', 'create', partner)

address = {
    'partner_id': partner_id,
    'type': 'default',
    'street': 'Rue du vieux chateau, 21',
    'zip': '1457',
    'city': 'Walhain',
    'phone': '(+32)10.68.94.39',
    'fax': '(+32)10.68.94.39',
}

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
Example of creation of a partner and his address.

Initial Title
OpenERP: XML-RPC Web services (Example)

Initial Tags

                                

Initial Language
Python