2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-09 15:10:54 +00:00
This commit is contained in:
Oliver Walters
2017-03-28 23:25:38 +11:00
parent a5009147c3
commit c111aaf9b2
5 changed files with 19 additions and 14 deletions

View File

@ -2,9 +2,10 @@ from django.contrib import admin
from .models import Supplier, SupplierPart, Customer
class CompanyAdmin(admin.ModelAdmin):
list_display=('name','URL','contact')
list_display = ('name', 'URL', 'contact')
admin.site.register(Customer, CompanyAdmin)
admin.site.register(Supplier, CompanyAdmin)
admin.site.register(SupplierPart)
admin.site.register(SupplierPart)

View File

@ -14,6 +14,8 @@ class Supplier(Company):
class Customer(Company):
""" Represents a customer
"""
pass
@ -31,14 +33,12 @@ class SupplierPart(models.Model):
MPN = models.CharField(max_length=100)
URL = models.URLField(blank=True)
description = models.CharField(max_length=250,
blank=True)
description = models.CharField(max_length=250, blank=True)
def __str__(self):
return "{mpn} - {supplier}".format(
mpn = self.MPN,
supplier = self.supplier.name)
mpn=self.MPN,
supplier=self.supplier.name)
class SupplierPriceBreak(models.Model):