Commit f9c6eaa5 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Specify keep depending on the parameter update.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4883 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6b0dd6c5
...@@ -681,10 +681,14 @@ class ERP5Generator(PortalGenerator): ...@@ -681,10 +681,14 @@ class ERP5Generator(PortalGenerator):
if not p.hasObject('portal_activities'): if not p.hasObject('portal_activities'):
addTool = p.manage_addProduct['CMFActivity'].manage_addTool addTool = p.manage_addProduct['CMFActivity'].manage_addTool
addTool('CMF Activity Tool', None) # Allow user to select active/passive addTool('CMF Activity Tool', None) # Allow user to select active/passive
# Initialize Activities # Initialize Activities
portal_activities = getToolByName(p, 'portal_activities', None) portal_activities = getToolByName(p, 'portal_activities', None)
if portal_activities is not None: if portal_activities is not None:
portal_activities.manageClearActivities() if kw.get('update', 0):
keep = 1
else:
keep = 0
portal_activities.manageClearActivities(keep=keep)
def setupTemplateTool(self, p, **kw): def setupTemplateTool(self, p, **kw):
"""Setup the Template Tool. Security must be set strictly. """Setup the Template Tool. Security must be set strictly.
......
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