@treeio_login_required
@handle_response_format
def ordered_product_view(request, ordered_product_id, response_format='html'):
 ordered_product = get_object_or_404(OrderedProduct, pk=ordered_product_id)
 if ((not request.user.profile.has_permission(ordered_product)) and (not request.user.profile.is_admin('treeio.sales'))):
  return user_denied(request, message="You don't have access to this Ordered Product")
 return render_to_response('sales/ordered_product_view', {'ordered_product': ordered_product}, context_instance=RequestContext(request), response_format=response_format)

@ treeio_login_required @ handle_response_format def ordered_product_view ( request , ordered_product_id , response_format = 'html' ) : ordered_product = get_object_or_404 ( OrderedProduct , pk = ordered_product_id ) if ( ( not request . user . profile . has_permission ( ordered_product ) ) and ( not request . user . profile . is_admin ( 'treeio.sales' ) ) ) : return user_denied ( request , message = "You don't have access to this Ordered Product" ) return render_to_response ( 'sales/ordered_product_view' , { 'ordered_product' : ordered_product } , context_instance = RequestContext ( request ) , response_format = response_format )
ordered product view .