mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	Updates to admin interface (#9103)
This commit is contained in:
		@@ -15,7 +15,16 @@ class BuildAdmin(admin.ModelAdmin):
 | 
			
		||||
 | 
			
		||||
    search_fields = ['reference', 'title', 'part__name', 'part__description']
 | 
			
		||||
 | 
			
		||||
    autocomplete_fields = ['parent', 'part', 'sales_order', 'take_from', 'destination']
 | 
			
		||||
    autocomplete_fields = [
 | 
			
		||||
        'completed_by',
 | 
			
		||||
        'destination',
 | 
			
		||||
        'parent',
 | 
			
		||||
        'part',
 | 
			
		||||
        'project_code',
 | 
			
		||||
        'responsible',
 | 
			
		||||
        'sales_order',
 | 
			
		||||
        'take_from',
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@admin.register(BuildItem)
 | 
			
		||||
@@ -34,3 +43,5 @@ class BuildLineAdmin(admin.ModelAdmin):
 | 
			
		||||
    list_display = ('build', 'bom_item', 'quantity')
 | 
			
		||||
 | 
			
		||||
    search_fields = ['build__title', 'build__reference', 'bom_item__sub_part__name']
 | 
			
		||||
 | 
			
		||||
    autocomplete_fields = ['bom_item', 'build']
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,16 @@ class PurchaseOrderAdmin(admin.ModelAdmin):
 | 
			
		||||
 | 
			
		||||
    inlines = [PurchaseOrderLineItemInlineAdmin]
 | 
			
		||||
 | 
			
		||||
    autocomplete_fields = ['supplier', 'project_code', 'contact', 'address']
 | 
			
		||||
    autocomplete_fields = [
 | 
			
		||||
        'address',
 | 
			
		||||
        'contact',
 | 
			
		||||
        'created_by',
 | 
			
		||||
        'destination',
 | 
			
		||||
        'supplier',
 | 
			
		||||
        'project_code',
 | 
			
		||||
        'received_by',
 | 
			
		||||
        'responsible',
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@admin.register(models.SalesOrder)
 | 
			
		||||
@@ -55,7 +64,15 @@ class SalesOrderAdmin(admin.ModelAdmin):
 | 
			
		||||
 | 
			
		||||
    search_fields = ['reference', 'customer__name', 'description']
 | 
			
		||||
 | 
			
		||||
    autocomplete_fields = ['customer', 'project_code', 'contact', 'address']
 | 
			
		||||
    autocomplete_fields = [
 | 
			
		||||
        'address',
 | 
			
		||||
        'contact',
 | 
			
		||||
        'created_by',
 | 
			
		||||
        'customer',
 | 
			
		||||
        'project_code',
 | 
			
		||||
        'responsible',
 | 
			
		||||
        'shipped_by',
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@admin.register(models.PurchaseOrderLineItem)
 | 
			
		||||
@@ -103,7 +120,7 @@ class SalesOrderShipmentAdmin(admin.ModelAdmin):
 | 
			
		||||
 | 
			
		||||
    search_fields = ['reference', 'order__reference', 'order__customer__name']
 | 
			
		||||
 | 
			
		||||
    autocomplete_fields = ('order',)
 | 
			
		||||
    autocomplete_fields = ('order', 'checked_by')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@admin.register(models.SalesOrderAllocation)
 | 
			
		||||
@@ -134,6 +151,8 @@ class ReturnOrderLineItemAdmin(admin.ModelAdmin):
 | 
			
		||||
 | 
			
		||||
    list_display = ['order', 'item', 'reference']
 | 
			
		||||
 | 
			
		||||
    autocomplete_fields = ['item', 'order']
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@admin.register(models.ReturnOrderExtraLine)
 | 
			
		||||
class ReturnOrdeerExtraLineAdmin(GeneralExtraLineAdmin, admin.ModelAdmin):
 | 
			
		||||
 
 | 
			
		||||
@@ -290,6 +290,8 @@ class InvenTreeUserAdmin(UserAdmin):
 | 
			
		||||
class OwnerAdmin(admin.ModelAdmin):
 | 
			
		||||
    """Custom admin interface for the Owner model."""
 | 
			
		||||
 | 
			
		||||
    search_fields = ['name']
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
admin.site.unregister(Group)
 | 
			
		||||
admin.site.register(Group, RoleGroupAdmin)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user