class ExportService(object):
""" Proxy for exported services.
+ All methods here should take an AuthProxy as their first parameter. It
+ will be appended by the calling framework.
+
Note that this class has no direct proxy, capable of calling
eservice.method(). Rather, the proxy should call
- dispatch(method, params)
+ dispatch(method,auth,params)
"""
_services = {}
# Dispatch a RPC call w.r.t. the method name. The dispatching
# w.r.t. the service (this class) is done by OpenERPDispatcher.
- def dispatch(self, method, params):
+ def dispatch(self, method, auth, params):
raise Exception("stub dispatch at %s" % self.__name)
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, _NOTHING, DEFAULT = range(10)
logger.log(channel, indent+line)
indent=indent_after
-def dispatch_rpc(service_name, method, params):
+def dispatch_rpc(service_name, method, params, auth):
""" Handle a RPC call.
This is pure Python code, the actual marshalling (from/to XML-RPC or
_log('service', tuple(replace_request_password(params)), depth=None, fn='%s.%s'%(service_name,method))
if logger.isEnabledFor(logging.DEBUG_RPC):
start_time = time.time()
- result = ExportService.getService(service_name).dispatch(method, params)
+ result = ExportService.getService(service_name).dispatch(method, auth, params)
if logger.isEnabledFor(logging.DEBUG_RPC):
end_time = time.time()
if not logger.isEnabledFor(logging.DEBUG_RPC_ANSWER):