(self)
return [product_id for product_id, product_name in sorted_product_name_map
                if product_id in self._products_with_ledgers
                ][self.pagination.start:][:self.pagination.count]
This sorts by name of products that should be shown according to filter and
        then returns the product ids to be shown according to the pagination
This sorts by name of products that should be shown according to filter and
        then returns the product ids to be shown according to the pagination
This sorts by name of products that should be shown according to filter and then returns the product ids to be shown according to the pagination
def filter_by_product_ids(self):
        """
        This sorts by name of products that should be shown according to filter and
        then returns the product ids to be shown according to the pagination
        """
        product_name_map = self._product_name_mapping
        # sort
        sorted_product_name_map = sorted(product_name_map.items(),
                                         key=lambda name_map: name_map[1],
                                         reverse=self._desc_product_order)
        # product to filter
        # -> that have ledgers and
        # -> fall into requested pagination
        return [product_id for product_id, product_name in sorted_product_name_map
                if product_id in self._products_with_ledgers
                ][self.pagination.start:][:self.pagination.count]
def filter_by_product_ids ( self ) : product_name_map = self . _product_name_mapping # sort sorted_product_name_map = sorted ( product_name_map . items ( ) , key = lambda name_map : name_map [ 1 ] , reverse = self . _desc_product_order ) # product to filter # -> that have ledgers and # -> fall into requested pagination return [ product_id for product_id , product_name in sorted_product_name_map if product_id in self . _products_with_ledgers ] [ self . pagination . start : ] [ : self . pagination . count ]