March 2018
Beginner to intermediate
336 pages
8h 22m
English
With XML-RPC, no session is maintained and the authentication credentials are sent with every request. This adds some overhead to the protocol, but makes it simpler to use.
Next, we set up access to the server methods that need a login to be accessed. These are exposed at the /xmlrpc/2/object endpoint, as shown in the following:
>>> api = client.ServerProxy('%s/xmlrpc/2/object' % srv)
>>> api.execute_kw(db, uid, pwd, 'res.partner', 'search_count', [[]])
40
Here, we are accessing the server API for the first time, performing a count on the Partner records. Methods are called using the execute_kw() method that takes the following arguments:
Read now
Unlock full access