本文整理汇总了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();
}
示例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;
}
示例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();
}
示例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();
}
}
示例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;
}
示例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();
}
示例7: database
import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
@Override
public Class<ResPartner> database() {
return ResPartner.class;
}
示例8: authority
import com.odoo.base.addons.res.ResPartner; //导入依赖的package包/类
@Override
public String authority() {
return ResPartner.AUTHORITY;
}
示例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);
}