#in the root of your CMF site create a folder with id, news # #select portal_workflow, see what workflow is being use for News Item #look in the contents tabs and select the workflow you want to change #goto the scripts tab #create a Script(Python) with the id moveOnPublish #parameters=state_change o=getattr(state_change, 'object') obj_parent=o.aq_parent portal_root=context.portal_url.getPortalObject() if o.getTypeInfo().getId()=='News Item': portal_root.Members.manage_pasteObjects( obj_parent.manage_cutObjects(o.getId()) ) #now goto the transitions tab and select the publish tranisition #in the Script (After) select 'moveOnPublish' #Save Changes #finally we need to apply the new changes to items that #use this workflow - this is not necessary but a good habit to form. #click on portal_workflow and in the Workflow tab click the #Update Security Settings button. #--NOTE-- # I was having problems doing this when a Member didnt have access # to the destination folder (where we are pasting objects) # so to properly do this I had to create an External Method # this is the external method and I just call it. # the destination is a reference to the folderish object you want to # paste the object. from Products.CMFCore.utils import getToolByName from AccessControl import getSecurityManager def move_pending(self, state_change): obj=state_change.object parent=state_change.object.getParentNode() dest=self.portal_url.getPortalObject().Members.runyaga membershiptool=getToolByName(self, 'portal_membership') member=getSecurityManager().getUser().getUserName() membershiptool.setLocalRoles(dest, (member,), 'Owner', reindex=0) dest.manage_pasteObjects( parent.manage_copyObjects( obj.getId() )) membershiptool.deleteLocalRoles(dest, (member,), reindex=0) # its really lame, you have set local roles on the object, then # perform the paste/action and then remove the local roles. # the upside is everything is transactional, the downside is # manage_pasteObjects() is broken and should be fixed.