Skip to Content
Menu
This question has been flagged
8774 Views

Hello , 

I'm trying to read some records , involving XML-RPC data exchange via a C# program and I m stuck at some point. I got an error : 

###---___

Server returned a fault exception: [1] Traceback (most recent call last):

File "/home/odoo-prod/instance/release/parts/odoo/openerp/service/wsgi_server.py", line 75, in xmlrpc_return

result = openerp.http.dispatch_rpc(service, method, params)

File "/home/odoo-prod/instance/release/parts/odoo/openerp/http.py", line 115, in dispatch_rpc

result = dispatch(method, params)

File "/home/odoo-prod/instance/release/parts/odoo/openerp/service/model.py", line 37, in dispatch

res = fn(db, uid, *params)

File "/home/odoo-prod/instance/release/parts/odoo/openerp/service/model.py", line 167, in execute_kw

return execute(db, uid, obj, method, *args, **kw or {})

TypeError: execute() argument after ** must be a mapping, not list

  ###---___

On this line :

 IEnumerable<string> i_1 = new List<string>() { };

IEnumerable<string> i_2 = new List<string>{ "name", "active", "vat", "ref" };

var v_1 = rpcClient.read(Properties.Settings.Default.Db, userid, Properties.Settings.Default.Password, "res.partner", "read",o_1, o_2);

Here's another version :

XmlRpcStruct[] partners = odooProxyObject.Read(Properties.Settings.Default.Db, userId, Properties.Settings.Default.Password, "res.partner", "read", new int[] { 0, 1, 2, 4, 30 }, new string[] { "id", "name" });

I don't find any solution on the web and i don't know how to proceed to solve this error.

Thank you for your help ! 



Avatar
Discard
Related Posts Replies Views Activity
1
Dec 24
158
0
Nov 24
63
2
Jul 24
698
0
Apr 24
554
3
Mar 24
579