Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
10283 Lượt xem

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 ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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).

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 21
3570
1
thg 5 16
3489
1
thg 2 16
5449
2
thg 3 15
4339
0
thg 7 25
240