Here is my Code :
public class OpenERP extends AsyncTask<Context, Void, Void>{final String TAG = "ERP";
final String url = "192.168.1.11:8069";
final String db = "Rabii";
final String username = "admin";
final String password = "123";
String a[] = new String[]{db, username, password};
List<String> list = new ArrayList<String>(Arrays.asList("", "", "", ""));
Map emptymap = emptyMap(); List<String> list1 = new ArrayList<String>(Arrays.asList("", "", "", "", ""));
@Override
protected Void doInBackground(Context... params) {
try {
final XmlRpcClient client = new XmlRpcClient();
final XmlRpcClientConfigImpl common_config = new XmlRpcClientConfigImpl();
common_config.setServerURL(new URL(String.format("%s/xmlrpc/2/common", url)));
int uid = (int)client.execute( common_config, "authenticate", asList(db, username, password, emptyMap()));
final XmlRpcClient models = new XmlRpcClient() { { setConfig(new XmlRpcClientConfigImpl() {{ setServerURL(new URL(String.format("%s/xmlrpc/2/object", url))); }});
} }; final Integer id = (Integer) models.execute("execute_kw", list2( db, uid, password,"pointage.task", "create",
asList(new HashMap() {{ put("name", "New Partner"); }}) )); }
catch (MalformedURLException e) { Log.e(TAG, "URL exception: " + e.getMessage()); }
return null ; }
private List asList(String db, String username, String password, Map<Object, Object> objectObjectMap)
{ return null; }}