← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 714723] Re: xml-rpc search of code field in product.product returns everything

 

Hello,

I have executed the following script at my end got the desired result as
expected which is only one product with respect to the  particular
domain.

import xmlrpclib

sock_common = xmlrpclib.ServerProxy
('http://localhost:8069/xmlrpc/common')

user = 'admin'
pwd = 'a'
dbname='test'


uid = sock_common.login(dbname ,user ,pwd)

sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')


args = [('default_code', '=', 'AT')]

data = sock.execute(dbname, uid, pwd, 'product.product', 'search', args)

print "====================",data

I have attached the output of script as the screen shot, So please gone
through it and notify us If problem still persist at your end.

For now I am closing this bug.

Thanks.

** Attachment added: "output_of_script_with_only_id_45.png"
   https://bugs.launchpad.net/openobject-server/+bug/714723/+attachment/1837678/+files/output_of_script_with_only_id_45.png

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/714723

Title:
  xml-rpc search of code field in product.product returns everything

Status in OpenERP Server:
  Invalid

Bug description:
  Over xml-rpc, when I perform a search for an item with a specific
  code, I get all items returned in my list.

  For example:
  >>> args = [('code', '=', 'thisisnotavalidcode'),]
  >>> data = sock.execute(dbname, uid, pwd, 'product.product', 'search', args) #no error, processes properly
  >>> data
  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]





References