@handle_response_format
@treeio_login_required
def task_time_slot_stop(request, slot_id, response_format='html'):
 slot = get_object_or_404(TaskTimeSlot, pk=slot_id)
 if (not request.user.profile.has_permission(slot, mode='w')):
  return user_denied(request, message="You don't have access to this TaskTimeSlot")
 if (request.POST and ('stop' in request.POST)):
  slot.time_to = datetime.now()
  slot.details = request.POST['details']
  slot.save()
 return HttpResponseRedirect(reverse('projects_task_view', args=[slot.task_id]))

@ handle_response_format @ treeio_login_required def task_time_slot_stop ( request , slot_id , response_format = 'html' ) : slot = get_object_or_404 ( TaskTimeSlot , pk = slot_id ) if ( not request . user . profile . has_permission ( slot , mode = 'w' ) ) : return user_denied ( request , message = "You don't have access to this TaskTimeSlot" ) if ( request . POST and ( 'stop' in request . POST ) ) : slot . time_to = datetime . now ( ) slot . details = request . POST [ 'details' ] slot . save ( ) return HttpResponseRedirect ( reverse ( 'projects_task_view' , args = [ slot . task_id ] ) )
stop tasktimeslot for preselected task .