jquery-3.2.1.js: 3860 jQuery.Deferred exception: True is not defined ReferenceError: True is not defined at Object. (file: /// C: /Users/user/Downloads/odoo-js/funciones.js: 38: 84) at mightThrow (file: /// C: /Users/user/Downloads/odoo-js/jquery-3.2.1.js: 3583: 29) at process (file: /// C: /Users/user/Downloads/odoo-js/jquery-3.2.1.js: 3651: 12) undefined jQuery.Deferred.exceptionHook @ jquery-3.2.1.js: 3860
Hello,
This error, I get when I make a second call using xmlrpc against Odoo. In the first call with xmlrpc to the login method, I get the user's uid. Once I get the uid, I make a second call with xmlrpc to the method execute_kw to get the clients of said uid (table res.partner) and in that second call is when the jQuery fails
function autenticar(){
var uid;
$.when(
$.xmlrpc({
url: 'http://192.168.1.50:8069/xmlrpc/2/common',
methodName: 'login',
crossDomain: true,
params: ['database', 'admin', 'admin'],
success: function(response, status, jqXHR) {uid = response;},
error: function(jqXHR, status, error) { alert('Error : ' + error.debug ) }
})
).then(function( data, textStatus, jqXHR ) {
$.xmlrpc({
url: 'http://192.168.1.50:8069/xmlrpc/2/object',
methodName: 'execute_kw',
crossDomain: true,
params: ['database',uid,'admin','res.partner', 'search',[[['is_company', '=', True], ['customer', '=', True]]]],
success: function(response, status, jqXHR) {alert('segunda_llamada');alert(response);},
error: function(jqXHR, status, error) { alert('Error : ' + error ) }
})
});
}