當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。