Commit 4d2d2ca5 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Modified constructor to follow new DocumentCreator


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4512 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f786432a
...@@ -39,18 +39,20 @@ from zLOG import LOG ...@@ -39,18 +39,20 @@ from zLOG import LOG
manage_addActiveProcessForm=DTMLFile('dtml/ActiveProcess_add', globals()) manage_addActiveProcessForm=DTMLFile('dtml/ActiveProcess_add', globals())
def addActiveProcess( self, id, title='', REQUEST=None ): def addActiveProcess( self, id, title='', REQUEST=None, activate_kw=None, **kw):
""" """
Add a new Category and generate UID by calling the Add a new Category and generate UID by calling the
ZSQLCatalog ZSQLCatalog. This code is inspired from Document Constructor
in Products.ERP5Type.Utils and should probably be merged.
""" """
sf = ActiveProcess( id ) o = ActiveProcess( id )
sf._setTitle(title) if activate_kw is not None:
self._setObject( id, sf ) o._v_activate_kw = activate_kw
sf = self._getOb( id ) o.uid = self.portal_catalog.newUid()
sf.reindexObject() self._setObject( id, o )
if kw: o.__of__(folder)._edit(force_update=1, **kw)
if REQUEST is not None: if REQUEST is not None:
return self.manage_main(self, REQUEST, update_menu=1) REQUEST['RESPONSE'].redirect( 'manage_main' )
class ActiveProcess(Base): class ActiveProcess(Base):
""" """
...@@ -60,7 +62,7 @@ class ActiveProcess(Base): ...@@ -60,7 +62,7 @@ class ActiveProcess(Base):
meta_type='CMF Active Process' meta_type='CMF Active Process'
portal_type='Active Process' portal_type='Active Process'
isPortalContent = 0 isPortalContent = 0
isRADContent = 1 isRADContent = 1
icon = None icon = None
......
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