Lorian requested item search box
[htsworkflow.git] / htsworkflow / frontend / inventory / admin.py
index 7d9d537d356b6a2c1327d57576e4e6aa40a29cb0..f6d0740d383fd41260d03417cb840fc92fea4b77 100644 (file)
@@ -3,13 +3,24 @@ from django.contrib import admin
 from htsworkflow.frontend.inventory.models import Item, ItemInfo, ItemType, Vendor, Location, LongTermStorage, ItemStatus, ReagentFlowcell, ReagentLibrary
 
 class ItemAdmin(admin.ModelAdmin):
+    save_as = True
+    save_on_top = True
     list_display = ('uuid', 'barcode_id','item_type', 'item_info', 'location', 'force_use_uuid', 'creation_date')
     list_filter = (
         'item_type',
     )
+    search_fields = [
+        'barcode_id',
+        'uuid',
+        'status__name',
+        'item_type__name',
+        'location__name',
+        'notes'
+    ]
 
 class ItemInfoAdmin(admin.ModelAdmin):
-    pass
+    save_as = True
+    save_on_top = True
 
 class ItemTypeAdmin(admin.ModelAdmin):
     pass