51 lines
1.2 KiB
Python
51 lines
1.2 KiB
Python
from django.contrib import admin
|
|
from unfold.admin import ModelAdmin
|
|
|
|
from core.apps.evaluation.models import MovablePropertyEvaluationModel
|
|
|
|
|
|
@admin.register(MovablePropertyEvaluationModel)
|
|
class MovablePropertyEvaluationAdmin(ModelAdmin):
|
|
list_display = (
|
|
"id",
|
|
"valuation",
|
|
"property_name",
|
|
"property_category",
|
|
"serial_number",
|
|
"manufacture_year",
|
|
"condition",
|
|
"quantity",
|
|
)
|
|
list_filter = (
|
|
"property_category",
|
|
"condition",
|
|
)
|
|
search_fields = (
|
|
"property_name",
|
|
"serial_number",
|
|
"valuation__conclusion_number",
|
|
)
|
|
readonly_fields = ("created_at", "updated_at")
|
|
autocomplete_fields = ("valuation",)
|
|
fieldsets = (
|
|
("Ariza", {
|
|
"fields": ("valuation",),
|
|
}),
|
|
("Mulk ma'lumotlari", {
|
|
"fields": (
|
|
"property_name",
|
|
"property_category",
|
|
"serial_number",
|
|
"manufacture_year",
|
|
"quantity",
|
|
),
|
|
}),
|
|
("Holat", {
|
|
"fields": ("condition",),
|
|
}),
|
|
("Tizim", {
|
|
"classes": ("collapse",),
|
|
"fields": ("created_at", "updated_at"),
|
|
}),
|
|
)
|