Beispiel #1
0
 def cancelCheckout(self):
     baseline = self._getBaseline()
     notify(event.CancelCheckoutEvent(self.context, baseline))
     wc_container = aq_parent(aq_inner(self.context))
     Folder.manage_delObjects(wc_container, [self.context.getId()])
     if getSecurityManager().checkPermission(permissions.View, baseline):
         return baseline
     else:
         return aq_parent(baseline)
Beispiel #2
0
 def manage_delObjects(self, ids=[], REQUEST=None):
     """ override default method to handle better the redirection """
     for activity_id in [id for id in ids if id in self.objectIds('Activity')]:
         # fallout all the workitems that have this activity id
         for wi in self.Catalog(meta_type='Workitem',
                                process_path=self.absolute_url(1),
                                activity_id=activity_id,
                                status=['active', 'inactive']):
             wi_obj = self.Catalog.getobject(wi.data_record_id_)
             wi_obj.aq_parent.falloutWorkitem(wi.id)
     Folder.manage_delObjects(self, ids)
     if REQUEST: REQUEST.RESPONSE.redirect(REQUEST.HTTP_REFERER)
Beispiel #3
0
 def manage_delObjects(self, ids=[], REQUEST=None):
   """ override default method to handle better the redirection """
   Folder.manage_delObjects(self, ids)
   if REQUEST: REQUEST.RESPONSE.redirect(REQUEST.HTTP_REFERER)