Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

XML-RPC : search_read doesn't exist for res_partner ?

By
cd
on 9/1/13, 7:14 AM 2,450 views

On the API doc there is :
search_read(cr, uid, domain=None, fields=None, offset=0, limit=None, order=None, context=None)

I try with XML-RPC.

fields = ['email', 'phone', 'name', 'country_id'] 
args = [('is_company', '=', '1')] 
myresult = sock.execute(dbname, uid, pwd, 'res.partner', 'search_read',args, fields)

I receive an error message :

 AttributeError: 'res.partner' object has no attribute 'search_read'

(i tried with "search.read" as well. Same error)

However, my webservice queries are working fine with "search" and "read". So is there a problem with the documentation ?

0
martin mueller
On 9/23/13, 6:42 PM

search_read is part of the openerp client lib , which is a layer above xmlrpc. (sorry can't give you the link because my karma is too low, but you will find it easily on github).

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/1/13, 7:14 AM
Seen: 2450 times
Last updated: 3/16/15, 8:10 AM