Не показывать список продуктов в используемом мобильном приложении OdooAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Не показывать список продуктов в используемом мобильном приложении Odoo

Сообщение Anonymous »

Не показывает список продуктов на экране при вставке продуктов в sqlite из используемого мобильного приложения Odoo, вставленного из Odoo erp версии 10.0
используйте API 30, эмулятор Android версии 11
Но показывает список продуктов на экране Android версии 10
почему бы не показывать на эмуляторе Android версии 11 или телефоне Android?
argsProduct.add(jsonArray); String productResponse = productProduct.getServerDataHelper().callMethodOdErp("get_product_ids_all_mobile", argsProduct); ResUsers users = new ResUsers(getContext(), null); ODataRow userInfo = users.browse(null,"id = ?",new String[]{user().getUserId().toString()});
try {
JSONObject jsonObject = new JSONObject(productResponse);
JSONArray productListResult = jsonObject.getJSONArray("result");
JSONObject updateObject = new JSONObject(productListResult.get(0).toString());
JSONObject insertObject = new JSONObject(productListResult.get(1).toString());
JSONObject totalObject = new JSONObject(productListResult.get(2).toString());
JSONArray updateList = updateObject.getJSONArray("update");
JSONArray insertList = insertObject.getJSONArray("insert");
JSONArray totalList = totalObject.getJSONArray("total"); int jsonObjectSize = 0;
if(totalList.length() > 0)
jsonObjectSize = totalList.getJSONObject(0).getInt("total");
if (updateList.length() > 0) {
int counter = 0;
List tempIds = new ArrayList();
for (int i = 0; i < updateList.length(); i++) {
JSONObject productObj = updateList.getJSONObject(i);
tempIds.add(productObj.getInt("id"));
counter ++;
if(counter>399) {
boolean result = call(tempIds, userInfo.getString("lang"), jsonObjectSize, "update");
tempIds.clear();
counter = 0;
if(result == false) {
this.cancel(true);
if (isCancelled()) break;
}
}

}
call(tempIds, userInfo.getString("lang"), jsonObjectSize, "update");
}

if (insertList.length() > 0) {
int counter = 0;
List tempIds = new ArrayList();
for (int i = 0; i < insertList.length(); i++) {
JSONObject productObj = insertList.getJSONObject(i);
tempIds.add(productObj.getInt("id"));
counter ++;
if(counter>399) {
boolean result = call(tempIds, userInfo.getString("lang"), jsonObjectSize, "insert");
tempIds.clear();
counter = 0;
if(result == false) {
menu.findItem(R.id.menu_dashboard_goto_today).setEnabled(true);
this.cancel(true);
if (isCancelled()) break;
}
}

}
call(tempIds, userInfo.getString("lang"), jsonObjectSize, "insert");
}


Подробнее здесь: https://stackoverflow.com/questions/788 ... mework-app
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»