change: change all admins
This commit is contained in:
@@ -24,7 +24,7 @@ class UserAdmin(DjangoUserAdmin):
|
||||
},
|
||||
),
|
||||
)
|
||||
list_display = ("username", "phone_number", "full_name", "is_blocked", "is_staff")
|
||||
list_display = ("id", "username", "phone_number", "full_name", "is_blocked", "is_staff")
|
||||
list_filter = ("is_staff", "is_superuser", "is_active", "is_blocked")
|
||||
search_fields = ("username", "full_name", "phone_number")
|
||||
ordering = ("username",)
|
||||
@@ -5,6 +5,6 @@ from core.apps.company.models import Branch
|
||||
|
||||
@admin.register(Branch)
|
||||
class BranchAdmin(admin.ModelAdmin):
|
||||
list_display = ['name', 'location', 'company']
|
||||
list_display = ['id', 'name', 'location', 'company']
|
||||
search_fields = ['name', 'location', 'company']
|
||||
list_filter = ['company']
|
||||
@@ -4,5 +4,5 @@ from core.apps.company.models import Company
|
||||
|
||||
@admin.register(Company)
|
||||
class CompanyAdmin(admin.ModelAdmin):
|
||||
list_display = ['name']
|
||||
list_display = ['id', 'name']
|
||||
search_fields = ['name']
|
||||
@@ -11,7 +11,7 @@ class PartyAmountInline(admin.StackedInline):
|
||||
|
||||
@admin.register(Party)
|
||||
class PartyAdmin(admin.ModelAdmin):
|
||||
list_display = ['number','mediator', 'delivery_date', 'payment_date', 'is_deleted']
|
||||
list_display = ['id','number','mediator', 'delivery_date', 'payment_date', 'is_deleted']
|
||||
inlines = [PartyAmountInline]
|
||||
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@ from core.apps.products.models.product import Product
|
||||
|
||||
@admin.register(Product)
|
||||
class ProductAdmin(admin.ModelAdmin):
|
||||
list_display = ['name']
|
||||
list_display = ['id', 'name']
|
||||
search_fields = ['name']
|
||||
@@ -5,5 +5,5 @@ from core.apps.products.models.unity import Unity
|
||||
|
||||
@admin.register(Unity)
|
||||
class UnityAdmin(admin.ModelAdmin):
|
||||
list_display = ['value']
|
||||
list_display = ['id','value']
|
||||
search_fields = ['value']
|
||||
@@ -6,9 +6,8 @@ from core.apps.projects.models.project import Project, ProjectFolder, ProjectLoc
|
||||
|
||||
@admin.register(Project)
|
||||
class ProjectAdmin(admin.ModelAdmin):
|
||||
list_display = ['name', 'location', 'start_date', 'end_date']
|
||||
list_display = ['id','name', 'location', 'start_date', 'end_date']
|
||||
search_fields = ['name']
|
||||
inlines = []
|
||||
|
||||
|
||||
@admin.register(ProjectFolder)
|
||||
@@ -19,4 +18,4 @@ class ProjectFolderAdmin(admin.ModelAdmin):
|
||||
|
||||
@admin.register(ProjectLocation)
|
||||
class ProjectLocation(admin.ModelAdmin):
|
||||
list_display = ['address', 'latitude', 'longitude']
|
||||
list_display = ['id','address', 'latitude', 'longitude']
|
||||
@@ -12,12 +12,12 @@ class DistrictInline(admin.TabularInline):
|
||||
|
||||
@admin.register(Region)
|
||||
class ReginAdmin(admin.ModelAdmin):
|
||||
list_display = ['name']
|
||||
list_display = ['id', 'name']
|
||||
search_fields = ['name']
|
||||
inlines = [DistrictInline]
|
||||
|
||||
|
||||
@admin.register(District)
|
||||
class DistrictAdmin(admin.ModelAdmin):
|
||||
list_display = ['name']
|
||||
list_display = ['id', 'name']
|
||||
search_fields = ['name']
|
||||
@@ -5,4 +5,4 @@ from core.apps.wherehouse.models import InvalidProduct
|
||||
|
||||
@admin.register(InvalidProduct)
|
||||
class InvalidProductAdmin(admin.ModelAdmin):
|
||||
list_display = ['inventory', 'project_folder', 'amount', 'status']
|
||||
list_display = ['id', 'inventory', 'project_folder', 'amount', 'status']
|
||||
@@ -5,4 +5,4 @@ from core.apps.wherehouse.models.stock_movemend import StockMovemend
|
||||
|
||||
@admin.register(StockMovemend)
|
||||
class StockMovemendAdmin(admin.ModelAdmin):
|
||||
list_display = ['wherehouse_to', 'wherehouse_from', 'product', 'quantity', 'movemend_type']
|
||||
list_display = ['id','wherehouse_to', 'wherehouse_from', 'product', 'quantity', 'movemend_type']
|
||||
@@ -5,6 +5,6 @@ from core.apps.wherehouse.models.wherehouse import WhereHouse
|
||||
|
||||
@admin.register(WhereHouse)
|
||||
class WhereHouseAdmin(admin.ModelAdmin):
|
||||
list_display = ['name', 'address', 'branch']
|
||||
list_display = ['id','name', 'address', 'branch']
|
||||
search_fields = ['name', 'address']
|
||||
list_filter = ['branch']
|
||||
Reference in New Issue
Block a user