mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			540 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			540 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| """
 | |
| Django views for interacting with Order app
 | |
| """
 | |
| 
 | |
| # -*- 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
 |