def __init__(self, name, audience=''):
Service._services[name] = self
self.__name = name
- self._methods = {}
def joinGroup(self, name):
raise Exception("No group for local services")
if cls.exists(name):
cls._services.pop(name)
- def exportMethod(self, method):
- if callable(method):
- self._methods[method.__name__] = method
-
def abortResponse(self, error, description, origin, details):
if not tools.config['debug_mode']:
raise Exception("%s -- %s\n\n%s"%(origin, description, details))
def __init__(self):
self.logger = logging.getLogger('web-services')
netsvc.Service.__init__(self, 'object_proxy', audience='')
- self.exportMethod(self.exec_workflow)
- self.exportMethod(self.execute)
def check(f):
@wraps(f)
# TODO the reports have methods with a 'title' kwarg that is redundant with this attribute
self.title = None
#self.joinGroup('report')
- self.exportMethod(self.create)
def create(self, cr, uid, ids, datas, context=None):
return False
def __init__(self, name):
assert not self.exists('wizard.'+name), 'The wizard "%s" already exists!' % (name,)
super(interface, self).__init__('wizard.'+name)
- self.exportMethod(self.execute)
self.wiz_name = name
def translate_view(self, cr, node, state, lang):
class workflow_service(netsvc.Service):
def __init__(self, name='workflow', audience='*'):
netsvc.Service.__init__(self, name, audience)
- self.exportMethod(self.trg_write)
- self.exportMethod(self.trg_delete)
- self.exportMethod(self.trg_create)
- self.exportMethod(self.trg_validate)
- self.exportMethod(self.trg_redirect)
- self.exportMethod(self.trg_trigger)
- self.exportMethod(self.clear_cache)
self.wkf_on_create_cache={}
def clear_cache(self, cr, uid):