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

Method moduleExists

src/com/odoo/orm/OEHelper.java:526–545  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

524 }
525
526 public boolean moduleExists(String name) {
527 Log.d(TAG, "OEHelper->moduleExists()");
528 boolean flag = false;
529 try {
530 OEDomain domain = new OEDomain();
531 domain.add("name", "ilike", name);
532 OEFieldsHelper fields = new OEFieldsHelper(new String[] { "state" });
533 JSONObject result = mOdoo.search_read("ir.module.module",
534 fields.get(), domain.get());
535 JSONArray records = result.getJSONArray("records");
536 if (records.length() > 0
537 && records.getJSONObject(0).getString("state")
538 .equalsIgnoreCase("installed")) {
539 flag = true;
540 }
541 } catch (Exception e) {
542 e.printStackTrace();
543 }
544 return flag;
545 }
546
547 public Odoo odoo() {
548 return mOdoo;

Callers

nothing calls this directly

Calls 5

getMethod · 0.95
search_readMethod · 0.80
addMethod · 0.45
getMethod · 0.45
getStringMethod · 0.45

Tested by

no test coverage detected