mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add some more search terms to the admin interface
This commit is contained in:
parent
1f6cbd7408
commit
0e5f10c020
@ -20,6 +20,12 @@ class BuildAdmin(ImportExportModelAdmin):
|
|||||||
'notes',
|
'notes',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
search_fields = [
|
||||||
|
'title',
|
||||||
|
'part__name',
|
||||||
|
'part__description',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class BuildItemAdmin(admin.ModelAdmin):
|
class BuildItemAdmin(admin.ModelAdmin):
|
||||||
|
|
||||||
|
@ -32,6 +32,11 @@ class CompanyAdmin(ImportExportModelAdmin):
|
|||||||
|
|
||||||
list_display = ('name', 'website', 'contact')
|
list_display = ('name', 'website', 'contact')
|
||||||
|
|
||||||
|
search_fields = [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class SupplierPartResource(ModelResource):
|
class SupplierPartResource(ModelResource):
|
||||||
""" Class for managing SupplierPart data import/export """
|
""" Class for managing SupplierPart data import/export """
|
||||||
@ -57,6 +62,13 @@ class SupplierPartAdmin(ImportExportModelAdmin):
|
|||||||
|
|
||||||
list_display = ('part', 'supplier', 'SKU')
|
list_display = ('part', 'supplier', 'SKU')
|
||||||
|
|
||||||
|
search_fields = [
|
||||||
|
'company__name',
|
||||||
|
'part__name',
|
||||||
|
'MPN',
|
||||||
|
'SKU',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class SupplierPriceBreakResource(ModelResource):
|
class SupplierPriceBreakResource(ModelResource):
|
||||||
""" Class for managing SupplierPriceBreak data import/export """
|
""" Class for managing SupplierPriceBreak data import/export """
|
||||||
|
@ -23,6 +23,12 @@ class PurchaseOrderAdmin(ImportExportModelAdmin):
|
|||||||
'creation_date'
|
'creation_date'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
search_fields = [
|
||||||
|
'reference',
|
||||||
|
'supplier__name',
|
||||||
|
'description',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class SalesOrderAdmin(ImportExportModelAdmin):
|
class SalesOrderAdmin(ImportExportModelAdmin):
|
||||||
|
|
||||||
@ -34,6 +40,12 @@ class SalesOrderAdmin(ImportExportModelAdmin):
|
|||||||
'creation_date',
|
'creation_date',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
search_fields = [
|
||||||
|
'reference',
|
||||||
|
'customer__name',
|
||||||
|
'description',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class POLineItemResource(ModelResource):
|
class POLineItemResource(ModelResource):
|
||||||
""" Class for managing import / export of POLineItem data """
|
""" Class for managing import / export of POLineItem data """
|
||||||
|
@ -117,6 +117,13 @@ class StockItemAdmin(ImportExportModelAdmin):
|
|||||||
|
|
||||||
list_display = ('part', 'quantity', 'location', 'status', 'updated')
|
list_display = ('part', 'quantity', 'location', 'status', 'updated')
|
||||||
|
|
||||||
|
# A list of search fields which can be used for lookup on matching 'autocomplete' fields
|
||||||
|
search_fields = [
|
||||||
|
'part__name',
|
||||||
|
'part__description',
|
||||||
|
'serial',
|
||||||
|
'batch',
|
||||||
|
]
|
||||||
|
|
||||||
class StockAttachmentAdmin(admin.ModelAdmin):
|
class StockAttachmentAdmin(admin.ModelAdmin):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user