当前位置: 首页>>代码示例>>Java>>正文


Java OdooAccountManager.getDetails方法代码示例

本文整理汇总了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;
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:22,代码来源:OdooLogin.java

示例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);
    }
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:21,代码来源:OdooAccountQuickManage.java

示例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;
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:20,代码来源:OModel.java

示例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;
}
 
开发者ID:Odoo-mobile,项目名称:hr,代码行数:22,代码来源:OdooLogin.java

示例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;
}
 
开发者ID:Odoo-mobile,项目名称:hr,代码行数:20,代码来源:OModel.java

示例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);
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:5,代码来源:BaseModelProvider.java


注:本文中的com.odoo.core.auth.OdooAccountManager.getDetails方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。