Skip to Content
Menú
This question has been flagged
5027 Vistes
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
Descartar
Related Posts Respostes Vistes Activitat
3
de gen. 19
7806
1
de març 17
4614
0
de nov. 15
3345
1
d’oct. 24
1852
1
d’abr. 24
1931