Merge branch 'customer_orders'

This commit is contained in:
James Newlands 2018-04-17 23:28:34 +10:00
commit e8f9b31f44
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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):
"""