Add searching to other admin views

This commit is contained in:
Oliver Walters 2019-09-13 23:32:49 +10:00
parent 9b1d0bee3b
commit 8578a3b8d1
2 changed files with 6 additions and 0 deletions

View File

@ -109,6 +109,8 @@ class PartCategoryAdmin(ImportExportModelAdmin):
list_display = ('name', 'pathstring', 'description') list_display = ('name', 'pathstring', 'description')
search_fields = ('name', 'description')
class PartAttachmentAdmin(admin.ModelAdmin): class PartAttachmentAdmin(admin.ModelAdmin):
@ -139,6 +141,8 @@ class BomItemAdmin(ImportExportModelAdmin):
list_display = ('part', 'sub_part', 'quantity') list_display = ('part', 'sub_part', 'quantity')
search_fields = ('part__name', 'part__description', 'sub_part__name', 'sub_part__description')
class ParameterTemplateAdmin(ImportExportModelAdmin): class ParameterTemplateAdmin(ImportExportModelAdmin):
list_display = ('name', 'units') list_display = ('name', 'units')

View File

@ -48,6 +48,8 @@ class LocationAdmin(ImportExportModelAdmin):
list_display = ('name', 'pathstring', 'description') list_display = ('name', 'pathstring', 'description')
search_fields = ('name', 'description')
class StockItemResource(ModelResource): class StockItemResource(ModelResource):
""" Class for managing StockItem data import/export """ """ Class for managing StockItem data import/export """