Hi,
I've made a python script using XML RPC to connect to openerp and create res.partners and it works fine.
Now I wonder if the same is possible in a google script?
I've tried but I can't connect to openerp!
Do you know the library to use, or a clue to start implementing the connection through XML RPC in a google script?
I've tried to use this code https://github.com/ikikko/Mimic-for-Google-Apps-Script/blob/master/mimic-gas.js , and then this :
function teste() {
var method = "login" ;
var request = new XmlRpcRequest("http://192.168.2.141:8086/xmlrpc/common", method);
request.addParam('testes');
request.addParam('admin');
request.addParam('password');
request.setAuthentication('admin','password','testes');
//var request_aut = request.setAuthentication('admin','vi!aveirofast#69');
//Logger.log(request);
//Logger.log('___________________________________');
var response = request.send();
//var response = request_aut.send();
//Logger.log(response);
//Logger.log(response.parseXML());
return response.parseXML();
};
But I always get the error :
Unable to parse the text. (line 253, file "Code")
253: return new XmlRpcResponse(Xml.parse(response.getContentText()));
Doing Logger.log(response); the log is empthy...
Thanks
Try this one: http://learnopenerp.blogspot.com/2019/10/connecting-to-odoo-using-xml-rpc.html