mirror of
https://github.com/inventree/InvenTree.git
synced 2026-01-09 07:31:08 -06:00
- part admin now shows total quantity in stock - part model can return a list of projects it is associated with
16 lines
395 B
Python
16 lines
395 B
Python
from django.contrib import admin
|
|
|
|
from .models import PartCategory, Part
|
|
|
|
class PartAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name', 'IPN', 'quantity', 'category')
|
|
|
|
# Custom form for PartCategory
|
|
class PartCategoryAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name', 'path', 'description')
|
|
|
|
|
|
admin.site.register(Part, PartAdmin)
|
|
admin.site.register(PartCategory, PartCategoryAdmin) |