本文整理汇总了Java中com.odoo.core.auth.OdooAccountManager.getDetails方法的典型用法代码示例。如果您正苦于以下问题:Java OdooAccountManager.getDetails方法的具体用法?Java OdooAccountManager.getDetails怎么用?Java OdooAccountManager.getDetails使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.odoo.core.auth.OdooAccountManager
的用法示例。
在下文中一共展示了OdooAccountManager.getDetails方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doInBackground
import com.odoo.core.auth.OdooAccountManager; //导入方法依赖的package包/类
@Override
protected Boolean doInBackground(OUser... params) {
mUser = params[0];
if (OdooAccountManager.createAccount(OdooLogin.this, mUser)) {
mUser = OdooAccountManager.getDetails(OdooLogin.this, mUser.getAndroidName());
OdooAccountManager.login(OdooLogin.this, mUser.getAndroidName());
FirstLaunchConfig.onFirstLaunch(OdooLogin.this, mUser);
try {
// Syncing company details
ODataRow company_details = new ODataRow();
company_details.put("id", mUser.getCompanyId());
ResCompany company = new ResCompany(OdooLogin.this);
company.quickCreateRecord(company_details);
Thread.sleep(500);
} catch (Exception e) {
e.printStackTrace();
}
return true;
}
return false;
}
示例2: onCreate
import com.odoo.core.auth.OdooAccountManager; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.base_account_quick_manage);
getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
getSupportActionBar().hide();
action = getIntent().getAction();
mApp = (App) getApplicationContext();
// Removing notification
ONotificationBuilder.cancelNotification(this, OSyncAdapter.REQUEST_SIGN_IN_ERROR);
user = OdooAccountManager.getDetails(this, getIntent().getStringExtra("android_name"));
if (action.equals("remove_account")) {
findViewById(R.id.layoutSavePassword).setVisibility(View.GONE);
removeAccount();
} else if (action.equals("reset_password")) {
updatePassword();
findViewById(R.id.cancel).setOnClickListener(this);
findViewById(R.id.save_password).setOnClickListener(this);
}
}
示例3: get
import com.odoo.core.auth.OdooAccountManager; //导入方法依赖的package包/类
public static OModel get(Context context, String model_name, String username) {
OModel model = modelRegistry.getModel(model_name, username);
OUser user = OdooAccountManager.getDetails(context, username);
if (model == null) {
try {
OPreferenceManager pfManager = new OPreferenceManager(context);
Class<?> model_class = Class.forName(pfManager.getString(model_name, null));
if (model_class != null) {
model = new OModel(context, model_name).createInstance(model_class);
if (model != null) {
modelRegistry.register(model);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
return model;
}
示例4: doInBackground
import com.odoo.core.auth.OdooAccountManager; //导入方法依赖的package包/类
@Override
protected Boolean doInBackground(OUser... params) {
mUser = params[0];
if (OdooAccountManager.createAccount(OdooLogin.this, mUser)) {
mUser = OdooAccountManager.getDetails(OdooLogin.this, mUser.getAndroidName());
OdooAccountManager.login(OdooLogin.this, mUser.getAndroidName());
FirstLaunchConfig.onFirstLaunch(OdooLogin.this, mUser);
try {
// Syncing company details
ODataRow company_details = new ODataRow();
company_details.put("id", mUser.getCompanyId());
ResCompany company = new ResCompany(OdooLogin.this, mUser);
company.quickCreateRecord(company_details);
Thread.sleep(500);
} catch (Exception e) {
e.printStackTrace();
}
return true;
}
return false;
}
示例5: get
import com.odoo.core.auth.OdooAccountManager; //导入方法依赖的package包/类
public static OModel get(Context context, String model_name, String username) {
OModel model = modelRegistry.getModel(model_name, username);
OUser user = OdooAccountManager.getDetails(context, username);
if (model == null) {
try {
OPreferenceManager pfManager = new OPreferenceManager(context);
Class<?> model_class = Class.forName(pfManager.getString(model_name, null));
if (model_class != null) {
model = new OModel(context, model_name, user).createInstance(model_class);
if (model != null) {
modelRegistry.register(model);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
return model;
}
示例6: getUser
import com.odoo.core.auth.OdooAccountManager; //导入方法依赖的package包/类
public OUser getUser(Uri uri) {
String username = uri.getQueryParameter(KEY_USERNAME);
return OdooAccountManager.getDetails(getContext(), username);
}