diff --git a/InvenTree/customer_orders/admin.py b/InvenTree/customer_orders/admin.py index f2919066ca..a321a491d3 100644 --- a/InvenTree/customer_orders/admin.py +++ b/InvenTree/customer_orders/admin.py @@ -5,10 +5,10 @@ from .models import CustomerOrder, CustomerOrderLine class CustomerOrderAdmin(admin.ModelAdmin): - pass + list_display = ('internal_ref',) class CustomerOrderLineAdmin(admin.ModelAdmin): - pass + list_display = ('customer_order', 'line_number') admin.site.register(CustomerOrder, CustomerOrderAdmin) diff --git a/InvenTree/customer_orders/models.py b/InvenTree/customer_orders/models.py index 057bc0bfa8..80bfd3933f 100644 --- a/InvenTree/customer_orders/models.py +++ b/InvenTree/customer_orders/models.py @@ -39,6 +39,9 @@ class CustomerOrder(models.Model): # Order notes notes = models.TextField(blank=True, default="", help_text="Order notes") + def __str__(self): + return "OrderRef {internal_ref}".format(internal_ref=self.internal_ref) + class CustomerOrderLine(models.Model): """