diff --git a/product/CMFActivity/ActivityTool.py b/product/CMFActivity/ActivityTool.py index 6962db64f0e0db2a80eef65e30882761a0679c8e..4b06bf71a6de5a1f5deba1b7c9ec2cea5bd6c7b9 100644 --- a/product/CMFActivity/ActivityTool.py +++ b/product/CMFActivity/ActivityTool.py @@ -1424,10 +1424,13 @@ class ActivityTool (Folder, UniqueObject): return message_count security.declareProtected( CMFCorePermissions.ManagePortal , 'newActiveProcess' ) - def newActiveProcess(self, **kw): - from ActiveProcess import addActiveProcess - new_id = str(self.generateNewId()) - return addActiveProcess(self, new_id, **kw) + def newActiveProcess(self, REQUEST=None, **kw): + # note: if one wants to create an Actice Process without ERP5 products, + # she can call ActiveProcess.addActiveProcess + obj = self.newContent(portal_type="Active Process", **kw) + if REQUEST is not None: + REQUEST['RESPONSE'].redirect( 'manage_main' ) + return obj # Active synchronisation methods security.declarePrivate('validateOrder')