MCPcopy Create free account
hub / github.com/Odoo-mobile/framework / search_read

Method search_read

src/com/odoo/orm/OEHelper.java:395–419  ·  view source on GitHub ↗
(boolean getRemain)

Source from the content-addressed store, hash-verified

393 }
394
395 private List<OEDataRow> search_read(boolean getRemain) {
396 List<OEDataRow> rows = new ArrayList<OEDataRow>();
397 try {
398 OEFieldsHelper fields = new OEFieldsHelper(
399 mDatabase.getDatabaseServerColumns());
400 JSONObject domain = null;
401 if (getRemain)
402 domain = getLocalIdsDomain("not in").get();
403 JSONObject result = mOdoo.search_read(mDatabase.getModelName(),
404 fields.get(), domain, 0, 100, null, null);
405 for (int i = 0; i < result.getJSONArray("records").length(); i++) {
406 JSONObject record = result.getJSONArray("records")
407 .getJSONObject(i);
408 OEDataRow row = new OEDataRow();
409 row.put("id", record.getInt("id"));
410 for (OEColumn col : mDatabase.getDatabaseServerColumns()) {
411 row.put(col.getName(), record.get(col.getName()));
412 }
413 rows.add(row);
414 }
415 } catch (Exception e) {
416 e.printStackTrace();
417 }
418 return rows;
419 }
420
421 public List<OEDataRow> search_read() {
422 Log.d(TAG, "OEHelper->search_read()");

Callers 7

search_read_remainMethod · 0.95
doInBackgroundMethod · 0.80
loginMethod · 0.80
syncWithServerMethod · 0.80
isModelInstalledMethod · 0.80
moduleExistsMethod · 0.80
doInBackgroundMethod · 0.80

Calls 9

getLocalIdsDomainMethod · 0.95
getMethod · 0.95
putMethod · 0.95
getModelNameMethod · 0.65
getMethod · 0.45
getIntMethod · 0.45
getNameMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected