Commit fbca63c1 authored by Aurel's avatar Aurel

simplify code that creates active process


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23193 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 73de760b
...@@ -53,6 +53,7 @@ def addActiveProcess(self, id, title='', REQUEST=None, activate_kw=None, **kw): ...@@ -53,6 +53,7 @@ def addActiveProcess(self, id, title='', REQUEST=None, activate_kw=None, **kw):
if kw: o._edit(force_update=1, **kw) if kw: o._edit(force_update=1, **kw)
if REQUEST is not None: if REQUEST is not None:
REQUEST['RESPONSE'].redirect( 'manage_main' ) REQUEST['RESPONSE'].redirect( 'manage_main' )
return o
class ActiveProcess(Base): class ActiveProcess(Base):
""" """
......
...@@ -1213,10 +1213,7 @@ class ActivityTool (Folder, UniqueObject): ...@@ -1213,10 +1213,7 @@ class ActivityTool (Folder, UniqueObject):
def newActiveProcess(self, **kw): def newActiveProcess(self, **kw):
from ActiveProcess import addActiveProcess from ActiveProcess import addActiveProcess
new_id = str(self.generateNewId()) new_id = str(self.generateNewId())
addActiveProcess(self, new_id) return addActiveProcess(self, new_id, **kw)
active_process = self._getOb(new_id)
active_process.edit(**kw)
return active_process
def reindexObject(self): def reindexObject(self):
self.immediateReindexObject() self.immediateReindexObject()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment