from django.contrib import admin
from . import models


class SupplierAdmin(admin.ModelAdmin):
    list_display = ('supplier_name', 'contact', )
    search_fields = ['supplier_name', 'contact', ]

admin.site.register(models.Suppliers, SupplierAdmin)

class InventoryUserAdmin(admin.ModelAdmin):
    list_display = ('employee_name', 'user_type')
    search_fields = ['employee_name', 'user_type']
    list_filter = ("user_type",)

admin.site.register(models.InventoryUser, InventoryUserAdmin)

class ProductsAdmin(admin.ModelAdmin):
    list_display = ('name', 'quantity', 'cost_price', 'selling_price',)
    search_fields = ['name', 'quantity', 'cost_price', 'selling_price',]
    list_filter = ("branch", "supplier",)

admin.site.register(models.Product, ProductsAdmin)

[((9, 0, 9, 52), 'django.contrib.admin.site.register', 'admin.site.register', ({(9, 20, 9, 36): 'models.Suppliers', (9, 38, 9, 51): 'SupplierAdmin'}, {}), '(models.Suppliers, SupplierAdmin)', False, 'from django.contrib import admin\n'), ((16, 0, 16, 61), 'django.contrib.admin.site.register', 'admin.site.register', ({(16, 20, 16, 40): 'models.InventoryUser', (16, 42, 16, 60): 'InventoryUserAdmin'}, {}), '(models.InventoryUser, InventoryUserAdmin)', False, 'from django.contrib import admin\n'), ((23, 0, 23, 50), 'django.contrib.admin.site.register', 'admin.site.register', ({(23, 20, 23, 34): 'models.Product', (23, 36, 23, 49): 'ProductsAdmin'}, {}), '(models.Product, ProductsAdmin)', False, 'from django.contrib import admin\n')]