parameters: (self, portal_type=None, **kw)
return_statement: return movement_list
docstring: Return a list of movements
docstring_summary: Return a list of movements
docstring_tokens: Return a list of movements
function: def _getMovementList(self, portal_type=None, **kw):
      """
      Return a list of movements
      """
      movement_portal_type_set = set(
        self.getPortalObject().getPortalMovementTypeList())
      movement_list = self.objectValues(
        portal_type=movement_portal_type_set, **kw)
      if movement_list:
        if isinstance(portal_type, str):
          portal_type = portal_type,
        elif isinstance(portal_type, (list, tuple)):
          portal_type = set(portal_type)
  
        # Browse lines recursively and collect leafs.
        stack = [iter(movement_list)]
        movement_list = []
        while stack:
          for sub_object in stack[-1]:
            content_list = sub_object.objectValues(
              portal_type=movement_portal_type_set, **kw)
            if sub_object.hasCellContent():
              cell_list = sub_object.getCellValueList()
              if len(cell_list) != len(content_list):
                content_list = set(content_list).difference(cell_list)
                if content_list:
                  stack.append(iter(content_list))
                  break
              else:
                movement_list.extend(x for x in content_list
                  if portal_type is None or x.getPortalType() in portal_type)
            elif content_list:
              stack.append(iter(content_list))
              break
            elif portal_type is None or sub_object.getPortalType() in portal_type:
              movement_list.append(sub_object)
          else:
            del stack[-1]
  
      return movement_list
function_tokens: def _getMovementList ( self , portal_type = None , * * kw ) : movement_portal_type_set = set ( self . getPortalObject ( ) . getPortalMovementTypeList ( ) ) movement_list = self . objectValues ( portal_type = movement_portal_type_set , * * kw ) if movement_list : if isinstance ( portal_type , str ) : portal_type = portal_type , elif isinstance ( portal_type , ( list , tuple ) ) : portal_type = set ( portal_type ) # Browse lines recursively and collect leafs. stack = [ iter ( movement_list ) ] movement_list = [ ] while stack : for sub_object in stack [ - 1 ] : content_list = sub_object . objectValues ( portal_type = movement_portal_type_set , * * kw ) if sub_object . hasCellContent ( ) : cell_list = sub_object . getCellValueList ( ) if len ( cell_list ) != len ( content_list ) : content_list = set ( content_list ) . difference ( cell_list ) if content_list : stack . append ( iter ( content_list ) ) break else : movement_list . extend ( x for x in content_list if portal_type is None or x . getPortalType ( ) in portal_type ) elif content_list : stack . append ( iter ( content_list ) ) break elif portal_type is None or sub_object . getPortalType ( ) in portal_type : movement_list . append ( sub_object ) else : del stack [ - 1 ] return movement_list