Add autocomplete fields to admin views for "build" app

This commit is contained in:
Oliver 2021-12-04 20:16:53 +11:00
parent 71aa6a910d
commit cdf63c43aa
2 changed files with 17 additions and 2 deletions

View File

@ -29,6 +29,14 @@ class BuildAdmin(ImportExportModelAdmin):
'part__description',
]
autocomplete_fields = [
'parent',
'part',
'sales_order',
'take_from',
'destination',
]
class BuildItemAdmin(admin.ModelAdmin):
@ -38,6 +46,13 @@ class BuildItemAdmin(admin.ModelAdmin):
'quantity'
)
autocomplete_fields = [
'build',
'bom_item',
'stock_item',
'install_into',
]
admin.site.register(Build, BuildAdmin)
admin.site.register(BuildItem, BuildItemAdmin)