mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
53 lines
1.3 KiB
Python
53 lines
1.3 KiB
Python
from django.contrib import admin
|
|
from import_export.admin import ImportExportModelAdmin
|
|
|
|
from .models import PartCategory, Part
|
|
from .models import PartAttachment, PartStar
|
|
from .models import SupplierPart
|
|
from .models import BomItem
|
|
|
|
|
|
class PartAdmin(ImportExportModelAdmin):
|
|
|
|
list_display = ('long_name', 'IPN', 'description', 'total_stock', 'category')
|
|
|
|
|
|
class PartCategoryAdmin(ImportExportModelAdmin):
|
|
|
|
list_display = ('name', 'pathstring', 'description')
|
|
|
|
|
|
class PartAttachmentAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('part', 'attachment', 'comment')
|
|
|
|
|
|
class PartStarAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('part', 'user')
|
|
|
|
|
|
class BomItemAdmin(ImportExportModelAdmin):
|
|
list_display = ('part', 'sub_part', 'quantity')
|
|
|
|
|
|
class SupplierPartAdmin(ImportExportModelAdmin):
|
|
list_display = ('part', 'supplier', 'SKU')
|
|
|
|
|
|
"""
|
|
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(PartAttachment, PartAttachmentAdmin)
|
|
admin.site.register(PartStar, PartStarAdmin)
|
|
admin.site.register(BomItem, BomItemAdmin)
|
|
admin.site.register(SupplierPart, SupplierPartAdmin)
|