def after_deactivate_transition_event(self):
        """Method triggered after a 'deactivate' transition for the current
        AnalysisService is performed. Removes this service from the Analysis
        Profiles or Analysis Request Templates where is assigned.
        This function is called automatically by
        bika.lims.workflow.AfterTransitionEventHandler
        """
        # Remove the service from profiles to which is assigned
        profiles = self.getBackReferences('AnalysisProfileAnalysisService')
        for profile in profiles:
            profile.remove_service(self)

        # Remove the service from templates to which is assigned
        bsc = api.get_tool('bika_setup_catalog')
        templates = bsc(portal_type='ARTemplate')
        for template in templates:
            template = api.get_object(template)
            template.remove_service(self)
def after_deactivate_transition_event ( self ) : profiles = self . getBackReferences ( 'AnalysisProfileAnalysisService' ) for profile in profiles : profile . remove_service ( self ) bsc = api . get_tool ( 'bika_setup_catalog' ) templates = bsc ( portal_type = 'ARTemplate' ) for template in templates : template = api . get_object ( template ) template . remove_service ( self )
Method triggered after a 'deactivate' transition for the current
        AnalysisService is performed. Removes this service from the Analysis
        Profiles or Analysis Request Templates where is assigned.
        This function is called automatically by
        bika.lims.workflow.AfterTransitionEventHandler