mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add autocomplete fields to admin views for "build" app
This commit is contained in:
parent
71aa6a910d
commit
cdf63c43aa
@ -29,6 +29,14 @@ class BuildAdmin(ImportExportModelAdmin):
|
|||||||
'part__description',
|
'part__description',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
autocomplete_fields = [
|
||||||
|
'parent',
|
||||||
|
'part',
|
||||||
|
'sales_order',
|
||||||
|
'take_from',
|
||||||
|
'destination',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class BuildItemAdmin(admin.ModelAdmin):
|
class BuildItemAdmin(admin.ModelAdmin):
|
||||||
|
|
||||||
@ -38,6 +46,13 @@ class BuildItemAdmin(admin.ModelAdmin):
|
|||||||
'quantity'
|
'quantity'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
autocomplete_fields = [
|
||||||
|
'build',
|
||||||
|
'bom_item',
|
||||||
|
'stock_item',
|
||||||
|
'install_into',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(Build, BuildAdmin)
|
admin.site.register(Build, BuildAdmin)
|
||||||
admin.site.register(BuildItem, BuildItemAdmin)
|
admin.site.register(BuildItem, BuildItemAdmin)
|
||||||
|
@ -126,7 +126,7 @@ class PartRelatedAdmin(admin.ModelAdmin):
|
|||||||
"""
|
"""
|
||||||
Class to manage PartRelated objects
|
Class to manage PartRelated objects
|
||||||
"""
|
"""
|
||||||
|
|
||||||
autocomplete_fields = ('part_1', 'part_2')
|
autocomplete_fields = ('part_1', 'part_2')
|
||||||
|
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ class PartStarAdmin(admin.ModelAdmin):
|
|||||||
class PartCategoryStarAdmin(admin.ModelAdmin):
|
class PartCategoryStarAdmin(admin.ModelAdmin):
|
||||||
|
|
||||||
list_display = ('category', 'user')
|
list_display = ('category', 'user')
|
||||||
|
|
||||||
autocomplete_fields = ('category',)
|
autocomplete_fields = ('category',)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user