mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Register BuildItem in admin interface
This commit is contained in:
parent
db5521f02e
commit
fbd5a2a270
@ -2,13 +2,15 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from import_export.admin import ImportExportModelAdmin
|
||||||
|
|
||||||
from .models import Build
|
from .models import Build, BuildItem
|
||||||
|
|
||||||
|
|
||||||
class BuildAdmin(admin.ModelAdmin):
|
class BuildAdmin(ImportExportModelAdmin):
|
||||||
|
|
||||||
list_display = ('part',
|
list_display = (
|
||||||
|
'part',
|
||||||
'status',
|
'status',
|
||||||
'batch',
|
'batch',
|
||||||
'quantity',
|
'quantity',
|
||||||
@ -19,4 +21,14 @@ class BuildAdmin(admin.ModelAdmin):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class BuildItemAdmin(admin.ModelAdmin):
|
||||||
|
|
||||||
|
list_display = (
|
||||||
|
'build',
|
||||||
|
'stock_item',
|
||||||
|
'quantity'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(Build, BuildAdmin)
|
admin.site.register(Build, BuildAdmin)
|
||||||
|
admin.site.register(BuildItem, BuildItemAdmin)
|
||||||
|
Loading…
Reference in New Issue
Block a user