Skip to Content
मेन्यू
This question has been flagged
5152 Views
I was set some breakpoints in odoo ir.attachment and found most of the time consuming was before the "create" method.
This is the Android code:
HashMap map = new HashMap();
map.put("res_model", res_model);
map.put("res_name", res_name);
map.put("type", "binary");
map.put("res_field","image");
map.put("res_id", res_id);
map.put("name", "image");
map.put("datas", image2Base64(imagePath));
try {
    models.execute("execute_kw", asList(
        db, uid, password,
        "ir.attachment", "create",
        asList(map)
    ));
} catch (XmlRpcException e) {
    e.printStackTrace();
}
Avatar
Discard
Related Posts Replies Views Activity
3
जन॰ 19
7958
1
मार्च 17
4737
0
नव॰ 15
3448
3
जुल॰ 25
2851
1
अक्तू॰ 24
2065