2
Openerp에서 WebService를 사용하여 데이터베이스 테이블에서 모든 세부 정보를 가져 오려고합니다. 나는 이것을 link으로 보았고 기본적으로 모든 데이터는 read
을 사용하여 읽을 수 있음을 알았습니다.웹 서비스를 사용하여 데이터베이스의 모든 행 가져 오기
나는 일련의 ID를 사용하고 세부 정보를 보여주었습니다. 내가 전체 표의 세부 사항을 얻을 수있는 방법이 있습니까?
여기 내 코드입니다
Object ids1[] = { 1,2,3,4 };
Object[] params2 = { "city", "name","email", "create_date",
"write_date" };
Vector<Object> arg = new Vector<Object>();
arg.add("stock");
arg.add(3);
arg.add("demo");
arg.add("res.partner.address");
arg.add("read");
arg.add(ids1);
arg.add(params2);
Object[] ids= (Object[]) client.execute("execute", arg);
for(int i = 0 ; i < ids.length ; i ++)
{
Iterator it = ((HashMap)ids[i]).entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
System.out.println(entry.getKey() + " = " + entry.getValue());
it.remove(); // avoids a ConcurrentModificationException
}System.out.println("--------------------------------------------");
}