def get_attachments(self):
        """Returns a list of attachments info dictionaries

        Original code taken from bika.lims.analysisrequest.view
        """

        attachments = []

        # process AR attachments
        for attachment in self.context.getAttachment():
            attachment_info = self.get_attachment_info(attachment)
            attachments.append(attachment_info)

        # process analyses attachments
        for analysis in self.context.getAnalyses(full_objects=True):
            for attachment in analysis.getAttachment():
                attachment_info = self.get_attachment_info(attachment)
                attachment_info["analysis"] = analysis.Title()
                attachment_info["analysis_uid"] = api.get_uid(analysis)
                attachments.append(attachment_info)

        return attachments
def get_attachments ( self ) : attachments = [ ] for attachment in self . context . getAttachment ( ) : attachment_info = self . get_attachment_info ( attachment ) attachments . append ( attachment_info ) for analysis in self . context . getAnalyses ( full_objects = True ) : for attachment in analysis . getAttachment ( ) : attachment_info = self . get_attachment_info ( attachment ) attachment_info [ "analysis" ] = analysis . Title ( ) attachment_info [ "analysis_uid" ] = api . get_uid ( analysis ) attachments . append ( attachment_info ) return attachments
Returns a list of attachments info dictionaries

        Original code taken from bika.lims.analysisrequest.view