Odoo-mobile / framework

Odoo Mobile Framework
https://play.google.com/store/apps/dev?id=8607973775002477408
Other
327 stars 374 forks source link

dictionary update sequence element #0 has length 1; 2 is required #320

Open 1Androider opened 7 years ago

1Androider commented 7 years ago

`JSONObject mJsonObject=new JSONObject(); mJsonObject.put("body", body); mJsonObject.put("subject", subject); mJsonObject.put("partner_ids", ContactIDs); OArguments args = new OArguments(); args.add(mJsonObject);

double newId=(Double) mModel.getServerDataHelper().callMethod("create", args, null, data1); Thread.sleep(500);

// successfully get newid and pass this newid to send_mail

ArrayList mMsgId=new ArrayList<>(); mMsgId.add((int)newId); OArguments args1 = new OArguments(); args1.add(mMsgId);

double newId1=(Double)mModel.getServerDataHelper().callMethod("send_mail", args1, null, null);

` getting error like: dictionary update sequence element #0 has length 1; 2 is required

for reference .callmethod syntax is : public Object callMethod(String method, OArguments args, HashMap<String, Object> context, HashMap<String, Object> kwargs) { return callMethod(mModel.getModelName(), method, args, context, kwargs); }

Please help to resolve this issue