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 via C#

By
Evolva
on 4/21/16, 3:28 AM 545 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 ! 



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: 4/21/16, 3:28 AM
Seen: 545 times
Last updated: 4/21/16, 3:33 AM