InvenTree/InvenTree/part/admin.py
2018-04-14 18:44:56 +10:00

39 lines
1.0 KiB
Python

from django.contrib import admin
from .models import PartCategory, Part
from .models import BomItem
from .models import PartAttachment
class PartAdmin(admin.ModelAdmin):
list_display = ('name', 'IPN', 'description', 'stock', 'category')
class PartCategoryAdmin(admin.ModelAdmin):
list_display = ('name', 'pathstring', 'description')
class BomItemAdmin(admin.ModelAdmin):
list_display=('part', 'sub_part', 'quantity')
class PartAttachmentAdmin(admin.ModelAdmin):
list_display = ('part', 'attachment')
"""
class ParameterTemplateAdmin(admin.ModelAdmin):
list_display = ('name', 'units', 'format')
class ParameterAdmin(admin.ModelAdmin):
list_display = ('part', 'template', 'value')
"""
admin.site.register(Part, PartAdmin)
admin.site.register(PartCategory, PartCategoryAdmin)
admin.site.register(BomItem, BomItemAdmin)
admin.site.register(PartAttachment, PartAttachmentAdmin)
#admin.site.register(PartParameter, ParameterAdmin)
#admin.site.register(PartParameterTemplate, ParameterTemplateAdmin)
#admin.site.register(CategoryParameterLink)