J'ai besion d'aide sur mon projet openerp
XML-RPC un client Android et un serveur OpenERP j'ai essayé de recuperer tout les parteners avec un client android depuis un serveur openerp, via xml-rpc mais ça marche pas .

voila la méthode Read()
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
public void Read()// String host, int port, String tinydb, String login,
 
// String password)
 
{
 
USERNAME = "admin";
 
PASSWORD = "admin";
 
DB_NAME = "dbaopenerp2";
 
rpcClient = new XMLRPCClient(HOST + URL_OBJECT);
 
Object[] params2 = { "city", "name", "partner_id", "country_id",
 
"email", "create_date", "write_date" };
 
try {
 
HashMap<?, ?>result = (HashMap<?, ?>)rpcClient.call("execute", DB_NAME,
 
1, PASSWORD, "res.partner","read",3,params2);
 
Object[] partner = (Object[]) result.get("partner_id");
 
Object[] country = (Object[]) result.get("country_id");
 
System.out.println(result.get("id"));
 
System.out.println(result.get("name"));
 
System.out.println(result.get("city"));
 
System.out.println(result.get("email"));
 
System.out.println(result.get("create_date"));
 
System.out.println(result.get("write_date"));
 
System.out.println("partner : " + partner[0].toString() + " , " + partner[1].toString());
 
System.out.println("country : " + country[0].toString() + " , " + country[1].toString());
 
} catch (XMLRPCException e) {
 
// TODO Auto-generated catch block
 
e.printStackTrace();
 
}
 
}