Esempio n. 1
0
 def isOpen(self):
     """ Returns true if the Batch is in 'open' state
     """
     revstatus = getCurrentState(self, StateFlow.review)
     canstatus = getCurrentState(self, StateFlow.cancellation)
     return revstatus == BatchState.open \
         and canstatus == CancellationState.active
Esempio n. 2
0
 def isOpen(self):
     """ Returns true if the Batch is in 'open' state
     """
     revstatus = getCurrentState(self, StateFlow.review)
     canstatus = getCurrentState(self, StateFlow.cancellation)
     return revstatus == BatchState.open \
         and canstatus == CancellationState.active
Esempio n. 3
0
 def workflow_guard_close(self):
     """ Permitted if current review_state is 'open'.
         The close transition is already controlled by 'Bika: Close Batch'
         permission, but left here for security reasons and also for the
         capability of being expanded/overrided by child products or
         instance-specific needs.
     """
     revstatus = getCurrentState(self, StateFlow.review)
     canstatus = getCurrentState(self, StateFlow.cancellation)
     return revstatus == BatchState.open \
         and canstatus == CancellationState.active
Esempio n. 4
0
 def workflow_guard_close(self):
     """ Permitted if current review_state is 'open'.
         The close transition is already controlled by 'Bika: Close Batch'
         permission, but left here for security reasons and also for the
         capability of being expanded/overrided by child products or
         instance-specific needs.
     """
     revstatus = getCurrentState(self, StateFlow.review)
     canstatus = getCurrentState(self, StateFlow.cancellation)
     return revstatus == BatchState.open \
         and canstatus == CancellationState.active
Esempio n. 5
0
 def getContacts(self, only_active=True):
     """ Return an array containing the contacts from this Client
     """
     contacts = []
     if only_active:
         contacts = [c for c in self.objectValues('Contact') if
                     getCurrentState(c, StateFlow.inactive) == InactiveState.active]
     else:
         contacts = self.objectValues('Contact')
     return contacts;
Esempio n. 6
0
 def getContacts(self, only_active=True):
     """ Return an array containing the contacts from this Client
     """
     contacts = []
     if only_active:
         contacts = [c for c in self.objectValues('Contact') if
                     getCurrentState(c, StateFlow.inactive) == InactiveState.active]
     else:
         contacts = self.objectValues('Contact')
     return contacts;