本文整理汇总了Java中com.odoo.core.rpc.listeners.IModuleInstallListener类的典型用法代码示例。如果您正苦于以下问题:Java IModuleInstallListener类的具体用法?Java IModuleInstallListener怎么用?Java IModuleInstallListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IModuleInstallListener类属于com.odoo.core.rpc.listeners包,在下文中一共展示了IModuleInstallListener类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: installedOnServer
import com.odoo.core.rpc.listeners.IModuleInstallListener; //导入依赖的package包/类
private void installedOnServer(String moduleName, final IModuleInstallListener callback,
OdooSyncResponse backResponse) {
OdooFields fields = new OdooFields();
fields.addAll(new String[]{"state", "name"});
ODomain domain = new ODomain();
domain.add("name", "=", moduleName);
searchRead("ir.module.module", fields, domain, 0, 0, null, new OdooResponse() {
@Override
public void onResponse(OdooResult response) {
if (response.getRecords().size() > 0) {
OdooRecord rec = response.getRecords().get(0);
callback.installedOnServer(rec.getString("state").equals("installed"));
}
}
@Override
public void onError(OdooError error) {
OdooLog.e(error);
callback.installedOnServer(false);
}
}, backResponse);
}
示例2: installedOnServer
import com.odoo.core.rpc.listeners.IModuleInstallListener; //导入依赖的package包/类
private void installedOnServer(String moduleName, final IModuleInstallListener callback,
OdooSyncResponse backResponse) {
OdooFields fields = new OdooFields();
fields.addAll(new String[]{"state", "name"});
ODomain domain = new ODomain();
domain.add("name", "=", moduleName);
searchRead("ir.module.module", fields, domain, 0, 0, null, new IOdooResponse() {
@Override
public void onResponse(OdooResult response) {
if (response.getRecords().size() > 0) {
OdooRecord rec = response.getRecords().get(0);
callback.installedOnServer(rec.getString("state").equals("installed"));
}
}
@Override
public void onError(OdooError error) {
OdooLog.e(error);
callback.installedOnServer(false);
}
}, backResponse);
}