I am an android developer who is now working with OODO API. My aim is to read a specific amount of data present in the res.partner object in the OpenERP.
I used the below code to get all the data's present in the res.partner object.
String[] arrayOfString4 = new String[4];
arrayOfString4[0] = "name";
arrayOfString4[1] = "date";
arrayOfString4[2] = "state_id";
arrayOfString4[3] = "ho_branch_id";
arrayOfString4[4] = "client_id";
tableId = (Object[]) client1.call("execute", DB_NAME, UID, PASSWORD, "res.partner", "search", new Object[0]); Object[]
tableitems = (Object[]) client1.call("execute", DB_NAME, UID, PASSWORD, "res.partner", "read", tableId, arrayOfString4);
This code retrieves more than 20,000 data's where I only need the first 50 data's. I checked this OODO API link for a solution.And from there I tried this.
tableId = (Object[]) client1.call("execute", DB_NAME, UID, PASSWORD, "res.partner", "search", new Object[0],new HashMap() {{ put("limit",50); }});
Object[] tableitems = (Object[]) client1.call("execute", DB_NAME, UID, PASSWORD, "res.partner", "read", tableId, arrayOfString4);
But I get an error java.lang.string cannot be converted into java.lang.integer Can anyone please help me how to limit the number of data's read??? I hope my question is clear enough..I am new at this. Thank you.