예제 #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
예제 #2
0
파일: batch.py 프로젝트: nafwa03/olims
 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
예제 #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
예제 #4
0
파일: batch.py 프로젝트: nafwa03/olims
 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
예제 #5
0
파일: client.py 프로젝트: pureboy8/OLiMS
 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;
예제 #6
0
파일: client.py 프로젝트: rockfruit/OLiMS
 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;