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


Java ResPartner类代码示例

本文整理汇总了Java中com.odoo.base.addons.res.ResPartner的典型用法代码示例。如果您正苦于以下问题:Java ResPartner类的具体用法?Java ResPartner怎么用?Java ResPartner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ResPartner类属于com.odoo.base.addons.res包,在下文中一共展示了ResPartner类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.customer_detail);
    OAppBarUtils.setAppBar(this, false);
    fileManager = new OFileManager(this);
    actionBar = getSupportActionBar();
    actionBar.setTitle("");
    if (savedInstanceState != null) {
        mEditMode = savedInstanceState.getBoolean(KEY_MODE);
        newImage = savedInstanceState.getString(KEY_NEW_IMAGE);
    }
    app = (App) getApplicationContext();
    parallaxScrollView = (ParallaxScrollView) findViewById(R.id.parallaxScrollView);
    parallaxScrollView.setActionBar(actionBar);
    userImage = (ImageView) findViewById(android.R.id.icon);
    mTitleView = (TextView) findViewById(android.R.id.title);
    resPartner = new ResPartner(this);
    extras = getIntent().getExtras();
    if (extras == null)
        mEditMode = true;
    setupActionBar();
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:24,代码来源:CustomerDetails.java

示例2: baseModels

import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
public static List<OModel> baseModels(Context context, OUser user) {
    List<OModel> models = new ArrayList<>();
    models.add(new IrModel(context));
    models.add(new ResPartner(context));
    models.add(new ResUsers(context));
    models.add(new ResCompany(context));
    models.add(new IrAttachment(context));
    models.add(new MailMessage(context));
    models.add(new ProductPublicCategory(context));
    models.add(new ProductProduct(context));
    models.add(new FavouriteProducts(context));
    models.add(new ShopCart(context));
    models.add(new RecentViewProducts(context));
    return models;
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:16,代码来源:BaseModels.java

示例3: onCreate

import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.base_mail_chatter_message_compose);
    getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    fileManager = new OFileManager(this);
    Bundle extra = getIntent().getExtras();
    mType = MessageType.valueOf(extra.getString("type"));
    mModel = OModel.get(this, extra.getString("model"), null);
    irAttachment = new IrAttachment(this);
    mailMessage = new MailMessage(this);
    server_id = extra.getInt("server_id");
    if (mModel.getModelName().equals("res.partner")) {
        partner_id = server_id;
    } else {
        ODataRow row = mModel.browse(mModel.selectRowId(server_id));
        for (OColumn col : mModel.getColumns(false)) {
            if (col.getType().isAssignableFrom(ResPartner.class)) {
                if (col.getRelationType() != null
                        && col.getRelationType() == OColumn.RelationType.ManyToOne) {
                    ODataRow partner = null;
                    if (!row.getString(col.getName()).equals("false")) {
                        partner = row.getM2ORecord(col.getName()).browse();
                    }
                    if (partner != null && partner.getInt("id") != 0) {
                        partner_id = partner.getInt("id");
                    }
                }
            }
        }
    }
    findViewById(R.id.btnAttachment).setOnClickListener(this);
    findViewById(R.id.btnSend).setOnClickListener(this);
    findViewById(R.id.btnCancel).setOnClickListener(this);
    edtSubject = (EditText) findViewById(R.id.messageSubject);
    edtBody = (EditText) findViewById(R.id.messageBody);
    horizontalScrollView = (LinearLayout) findViewById(R.id.attachmentsList);
    init();
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:41,代码来源:MailChatterCompose.java

示例4: onRefresh

import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
@Override
public void onRefresh() {
    if (inNetwork()) {
        parent().sync().requestSync(ResPartner.AUTHORITY);
        setSwipeRefreshing(true);
    } else {
        hideRefreshingProgress();
        Toast.makeText(getActivity(), _s(R.string.toast_network_required), Toast.LENGTH_LONG)
                .show();
    }
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:12,代码来源:Customers.java

示例5: baseModels

import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
public static List<OModel> baseModels(Context context, OUser user) {
    List<OModel> models = new ArrayList<>();
    models.add(new OdooNews(context, user));
    models.add(new IrModel(context, user));
    models.add(new ResPartner(context, user));
    models.add(new ResUsers(context, user));
    models.add(new ResCompany(context, user));
    models.add(new IrAttachment(context, user));
    models.add(new MailMessage(context, user));
    return models;
}
 
开发者ID:Odoo-mobile,项目名称:hr,代码行数:12,代码来源:BaseModels.java

示例6: onCreate

import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.base_mail_chatter_message_compose);
    getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    fileManager = new OFileManager(this);
    Bundle extra = getIntent().getExtras();
    mType = MessageType.valueOf(extra.getString("type"));
    mModel = OModel.get(this, extra.getString("model"), null);
    irAttachment = new IrAttachment(this, null);
    mailMessage = new MailMessage(this, null);
    server_id = extra.getInt("server_id");
    if (mModel.getModelName().equals("res.partner")) {
        partner_id = server_id;
    } else {
        ODataRow row = mModel.browse(mModel.selectRowId(server_id));
        for (OColumn col : mModel.getColumns(false)) {
            if (col.getType().isAssignableFrom(ResPartner.class)) {
                if (col.getRelationType() != null
                        && col.getRelationType() == OColumn.RelationType.ManyToOne) {
                    ODataRow partner = null;
                    if (!row.getString(col.getName()).equals("false")) {
                        partner = row.getM2ORecord(col.getName()).browse();
                    }
                    if (partner != null && partner.getInt("id") != 0) {
                        partner_id = partner.getInt("id");
                    }
                }
            }
        }
    }
    findViewById(R.id.btnAttachment).setOnClickListener(this);
    findViewById(R.id.btnSend).setOnClickListener(this);
    findViewById(R.id.btnCancel).setOnClickListener(this);
    edtSubject = (EditText) findViewById(R.id.messageSubject);
    edtBody = (EditText) findViewById(R.id.messageBody);
    horizontalScrollView = (LinearLayout) findViewById(R.id.attachmentsList);
    init();
}
 
开发者ID:Odoo-mobile,项目名称:hr,代码行数:41,代码来源:MailChatterCompose.java

示例7: database

import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
@Override
public Class<ResPartner> database() {
    return ResPartner.class;
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:5,代码来源:Customers.java

示例8: authority

import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
@Override
public String authority() {
    return ResPartner.AUTHORITY;
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:5,代码来源:CustomersSyncProvider.java

示例9: getSyncAdapter

import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
@Override
public OSyncAdapter getSyncAdapter(OSyncService service, Context context) {
    return new OSyncAdapter(context, ResPartner.class, service, true);
}
 
开发者ID:dpr-odoo,项目名称:trainee-om-shop,代码行数:5,代码来源:CustomerSyncService.java


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