@handle_response_format
@treeio_login_required
def receivable_edit(request, receivable_id, response_format='html'):
 receivable = get_object_or_404(Liability, pk=receivable_id)
 if request.POST:
  if ('cancel' not in request.POST):
   form = ReceivableForm(request.user.profile, request.POST, instance=receivable)
   if form.is_valid():
    receivable = form.save(commit=False)
    convert(receivable, 'value')
    return HttpResponseRedirect(reverse('finance_receivable_view', args=[receivable.id]))
  else:
   return HttpResponseRedirect(reverse('finance_receivable_view', args=[receivable.id]))
 else:
  form = ReceivableForm(request.user.profile, instance=receivable)
 return render_to_response('finance/receivable_edit', {'form': form, 'liability': receivable}, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required def receivable_edit ( request , receivable_id , response_format = 'html' ) : receivable = get_object_or_404 ( Liability , pk = receivable_id ) if request . POST : if ( 'cancel' not in request . POST ) : form = ReceivableForm ( request . user . profile , request . POST , instance = receivable ) if form . is_valid ( ) : receivable = form . save ( commit = False ) convert ( receivable , 'value' ) return HttpResponseRedirect ( reverse ( 'finance_receivable_view' , args = [ receivable . id ] ) ) else : return HttpResponseRedirect ( reverse ( 'finance_receivable_view' , args = [ receivable . id ] ) ) else : form = ReceivableForm ( request . user . profile , instance = receivable ) return render_to_response ( 'finance/receivable_edit' , { 'form' : form , 'liability' : receivable } , context_instance = RequestContext ( request ) , response_format = response_format )
liability edit page .