Hello community
I want to communicate between two databases
in a module I created this : to see how it works B1
import xmlrpclib
username = 'admin' #the user
pwd = 'admin' #the password of the user
dbname = 'test' #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': 'Chaussee de Namur 40',
'zip': '1367',
'city': 'Grand-Rosiere',
'phone': '+3281813700',
'fax': '+3281733501',
}
address_id = sock.execute(dbname, uid, pwd, 'res.partner.address', 'create', address)
that loop on it :
2013-12-03 16:34:10,525 19044 INFO xmlr openerp.modules.loading: loading 1 modules... 2013-12-03 16:34:10,565 19044 INFO xmlr openerp.modules.loading: loading 28 modules...
any ideas ??