def xmlrpc_return(start_response, service, method, params, string_faultcode=False):
 try:
  result = odoo.http.dispatch_rpc(service, method, params)
  response = xmlrpclib.dumps((result,), methodresponse=1, allow_none=False, encoding=None)
 except Exception as e:
  if string_faultcode:
   response = xmlrpc_handle_exception_string(e)
  else:
   response = xmlrpc_handle_exception_int(e)
 start_response('200 OK', [('Content-Type', 'text/xml'), ('Content-Length', str(len(response)))])
 return [response]

def xmlrpc_return ( start_response , service , method , params , string_faultcode = False ) : try : result = odoo . http . dispatch_rpc ( service , method , params ) response = xmlrpclib . dumps ( ( result , ) , methodresponse = 1 , allow_none = False , encoding = None ) except Exception as e : if string_faultcode : response = xmlrpc_handle_exception_string ( e ) else : response = xmlrpc_handle_exception_int ( e ) start_response ( '200 OK' , [ ( 'Content-Type' , 'text/xml' ) , ( 'Content-Length' , str ( len ( response ) ) ) ] ) return [ response ]
helper to call a services method with some params .