product_pricelist.price_get_multi() returns a dictionary with integer as keys. Unfortunatly this is not supported by xmlrpclib.
>>> try:
... oerp.execute('product.pricelist', 'price_get_multi', [1], [(700, 1, 0)], {'lang': 'de_DE'})
... except Exception as e:
... print e.oerp_traceback
...Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/service/wsgi_server.py", line 83, in xmlrpc_return
response = xmlrpclib.dumps((result,), methodresponse=1, allow_none=False, encoding=None)
File "/usr/lib/python2.7/xmlrpclib.py", line 1085, in dumps
data = m.dumps(params)
File "/usr/lib/python2.7/xmlrpclib.py", line 632, in dumps
dump(v, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 654, in __dump
f(self, value, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 733, in dump_struct
raise TypeError, "dictionary key must be string"
TypeError: dictionary key must be string
I can provide a patch that converts the keys to strings accordingly. The same is done by the json module.
Should I submit a patch or is there a better way to access the function using oerplib?