2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

Index page for showing all purchase orders

This commit is contained in:
Oliver Walters
2019-06-04 23:59:15 +10:00
parent 4f1acddb5d
commit c49b8546f0
5 changed files with 75 additions and 4 deletions

View File

@ -1,3 +1,26 @@
from django.shortcuts import render
"""
Django views for interacting with Order app
"""
# Create your views here.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.views.generic import DetailView, ListView
from .models import PurchaseOrder
from InvenTree.status_codes import OrderStatus
class PurchaseOrderIndex(ListView):
model = PurchaseOrder
template_name = 'order/purchase_orders.html'
context_object_name = 'orders'
def get_context_data(self):
ctx = super().get_context_data()
ctx['OrderStatus'] = OrderStatus
return ctx