def order_timeline(request, order_id):
order = get_object_or_404(Order, pk=order_id)
first_process = order.first_process_in_order()
timeline_date = datetime.date.today().strftime("%b %e %Y 00:00:00 GMT-0600")
if first_process:
if first_process.start_date:
timeline_date = first_process.start_date.strftime("%b %e %Y 00:00:00 GMT-0600")
unassigned = Commitment.objects.unfinished().filter(
independent_demand=order,
from_agent=None,
event_type__relationship="work").order_by("due_date")
return render_to_response("valueaccounting/timeline.html", {
"orderId": order.id,
"context_id": 0,
"useContextId": 0,
"timeline_date": timeline_date,
"unassigned": unassigned,
}, context_instance=RequestContext(request))
评论列表
文章目录