예제 #1
0
파일: orders.py 프로젝트: vanderheyde/ecm
def _order_details(request, order, error=None):
    logs = order.logs.all().order_by('-date')
    valid_transitions = [(trans.__name__, verbose_name(trans))
                         for trans in order.get_valid_transitions(customer=True)]
    data = {
        'order': order,
        'logs': logs,
        'valid_transitions': valid_transitions,
        'states': Order.STATES.items(),
        'error': error,
    }

    return render_to_response('ecm/shop/shop_order_details.html', data, Ctx(request))
예제 #2
0
파일: orders.py 프로젝트: Betriebsrat/ecm
def _order_details(request, order, error=None):
    logs = order.logs.all().order_by('-date')
    valid_transitions = [(trans.__name__, verbose_name(trans))
                         for trans in order.get_valid_transitions(customer=False)]

    # we get the 1st jobs associated to this order's rows
    jobs = order.jobs.select_related(depth=2).filter(parent_job__isnull=True)

    data = {
        'order': order,
        'logs': logs,
        'valid_transitions': valid_transitions,
        'states': Order.STATES.items(),
        'error': error,
        'jobs_tree': json.dumps(_build_jobs_tree(jobs)),
    }

    return render_to_response('ecm/industry/order_details.html', data, Ctx(request))
예제 #3
0
파일: orders.py 프로젝트: vanderheyde/ecm
def _order_details(request, order, error=None):
    logs = order.logs.all().order_by('-date')
    valid_transitions = [
        (trans.__name__, verbose_name(trans))
        for trans in order.get_valid_transitions(customer=False)
    ]

    # we get the 1st jobs associated to this order's rows
    jobs = order.jobs.select_related(depth=2).filter(parent_job__isnull=True)

    data = {
        'order': order,
        'logs': logs,
        'valid_transitions': valid_transitions,
        'states': Order.STATES.items(),
        'error': error,
        'jobs_tree': json.dumps(_build_jobs_tree(jobs)),
    }

    return render_to_response('ecm/industry/order_details.html', data,
                              Ctx(request))