Save data type many2one in Odoo using the library aXMLRPC android

0

I'm working on an Android project that consists of connecting an Android application to Odoo using the library aXMLRPC .

The application will allow the user to create a sale ( sale.order ).

But now, I have the object ( sale.order ) that has a relation many2one with another record ( Producto ), I do not know how to send this data to save them on the server odoo .

My question is about how I can structure the object ( sale.order ) to send save.

I enclose the part of how I was formulating the object to send but I have errors.

final String sesion="usuario";

   final  HashMap lines=new HashMap();
    lines.put("product_id","nombre producto");
    lines.put("qty","2");
    lines.put("discount","0");

    // Create record
    @SuppressWarnings("unchecked")
    Integer idC = Parametros.oc.create("sale.order", new HashMap() {{
        put("session_id", sesion);
        put("date_order", "19/03/2018");
        put("partnet_id", "ABAD JARRIN");
        put("lines",new Object[]{lines});
    }
    });
    msgResult += "resultado enviado: " + idC.toString();
    
asked by wrocano 19.03.2018 в 18:02
source

0 answers