#NEWLINE# @ receiver ( requisition_approved ) #NEWLINE# def approve_requisitions( sender , requisitions , **kwargs ) : #NEWLINE# #INDENT# if ( requisitions and ( requisitions [ 0 ] . requisition_status == RequisitionStatus . APPROVED ) ) : #NEWLINE# #INDENT# project = Domain . get_by_name ( project [ 0 ] . domain ) #NEWLINE# if ( project . commtrack_enabled and project . commtrack_settings . openlmis_enabled ) : #NEWLINE# #INDENT# endpoint = OpenLMISEndpoint . from_config ( project . commtrack_settings . openlmis_config ) #NEWLINE# approve_requisition ( requisitions , endpoint )