admin fayllari to'g'irlandi #17
@@ -6,26 +6,105 @@ PAGES = [
|
|||||||
"seperator": False,
|
"seperator": False,
|
||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"title": _("Home page"),
|
"title": _("Bosh sahifa"),
|
||||||
"icon": "home",
|
"icon": "home",
|
||||||
"link": reverse_lazy("admin:index"),
|
"link": reverse_lazy("admin:index"),
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": _("Auth"),
|
"title": _("Foydalanuvchilar"),
|
||||||
"separator": True, # Top border
|
"separator": True,
|
||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"title": _("Users"),
|
"title": _("Foydalanuvchilar"),
|
||||||
"icon": "group",
|
"icon": "group",
|
||||||
"link": reverse_lazy("admin:http_user_changelist"),
|
"link": reverse_lazy("admin:accounts_user_changelist"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": _("Group"),
|
"title": _("Guruhlar"),
|
||||||
"icon": "group",
|
"icon": "admin_panel_settings",
|
||||||
"link": reverse_lazy("admin:auth_group_changelist"),
|
"link": reverse_lazy("admin:auth_group_changelist"),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"title": _("Buyurtmachilar"),
|
||||||
|
"separator": True,
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"title": _("Buyurtmachilar"),
|
||||||
|
"icon": "person",
|
||||||
|
"link": reverse_lazy("admin:evaluation_customermodel_changelist"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Mulk egalari"),
|
||||||
|
"icon": "badge",
|
||||||
|
"link": reverse_lazy("admin:evaluation_propertyownermodel_changelist"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Arizalar"),
|
||||||
|
"separator": True,
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"title": _("Barcha arizalar"),
|
||||||
|
"icon": "description",
|
||||||
|
"link": reverse_lazy("admin:evaluation_valuationmodel_changelist"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Ariza hujjatlari"),
|
||||||
|
"icon": "attach_file",
|
||||||
|
"link": reverse_lazy("admin:evaluation_valuationdocumentmodel_changelist"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Baholash turlari"),
|
||||||
|
"separator": True,
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"title": _("Avto baholash"),
|
||||||
|
"icon": "directions_car",
|
||||||
|
"link": reverse_lazy("admin:evaluation_autoevaluationmodel_changelist"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Transport vositalari"),
|
||||||
|
"icon": "car_repair",
|
||||||
|
"link": reverse_lazy("admin:evaluation_vehiclemodel_changelist"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Ko'chmas mulk"),
|
||||||
|
"icon": "home_work",
|
||||||
|
"link": reverse_lazy("admin:evaluation_realestateevaluationmodel_changelist"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Ko'char mulk"),
|
||||||
|
"icon": "inventory_2",
|
||||||
|
"link": reverse_lazy("admin:evaluation_movablepropertyevaluationmodel_changelist"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Tezkor baholash"),
|
||||||
|
"icon": "bolt",
|
||||||
|
"link": reverse_lazy("admin:evaluation_quickevaluationmodel_changelist"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Natijalar"),
|
||||||
|
"separator": True,
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"title": _("Hisobotlar"),
|
||||||
|
"icon": "summarize",
|
||||||
|
"link": reverse_lazy("admin:evaluation_evaluationreportmodel_changelist"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("To'lovlar"),
|
||||||
|
"icon": "payments",
|
||||||
|
"link": reverse_lazy("admin:payment_paymentmodel_changelist"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -90,6 +90,6 @@ UNFOLD = {
|
|||||||
"SIDEBAR": {
|
"SIDEBAR": {
|
||||||
"show_search": True,
|
"show_search": True,
|
||||||
"show_all_applications": True,
|
"show_all_applications": True,
|
||||||
# "navigation": navigation.PAGES,
|
"navigation": navigation.PAGES,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,27 @@ from core.apps.evaluation.models import AutoEvaluationModel
|
|||||||
|
|
||||||
|
|
||||||
@admin.register(AutoEvaluationModel)
|
@admin.register(AutoEvaluationModel)
|
||||||
class AutoevaluationAdmin(ModelAdmin):
|
class AutoEvaluationAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"valuation",
|
||||||
|
"vehicle",
|
||||||
|
"created_at",
|
||||||
|
)
|
||||||
|
search_fields = (
|
||||||
|
"valuation__conclusion_number",
|
||||||
|
"vehicle__brand",
|
||||||
|
"vehicle__model",
|
||||||
|
"vehicle__license_plate",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
raw_id_fields = ("valuation", "vehicle")
|
||||||
|
fieldsets = (
|
||||||
|
("Bog'lanishlar", {
|
||||||
|
"fields": ("valuation", "vehicle"),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,51 @@ from core.apps.evaluation.models import CustomerModel, PropertyOwnerModel
|
|||||||
class CustomerAdmin(ModelAdmin):
|
class CustomerAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"customer_type",
|
||||||
|
"first_name",
|
||||||
|
"last_name",
|
||||||
|
"jshshir",
|
||||||
|
"inn",
|
||||||
|
"org_name",
|
||||||
|
"created_at",
|
||||||
|
)
|
||||||
|
list_filter = ("customer_type",)
|
||||||
|
search_fields = (
|
||||||
|
"first_name",
|
||||||
|
"last_name",
|
||||||
|
"jshshir",
|
||||||
|
"passport_number",
|
||||||
|
"inn",
|
||||||
|
"org_name",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
fieldsets = (
|
||||||
|
("Umumiy", {
|
||||||
|
"fields": ("customer_type",),
|
||||||
|
}),
|
||||||
|
("Jismoniy shaxs", {
|
||||||
|
"fields": (
|
||||||
|
"jshshir",
|
||||||
|
("passport_series", "passport_number"),
|
||||||
|
("first_name", "last_name", "middle_name"),
|
||||||
|
"address",
|
||||||
|
("passport_issued_date", "passport_issued_by"),
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Yuridik shaxs", {
|
||||||
|
"fields": (
|
||||||
|
"inn",
|
||||||
|
"org_name",
|
||||||
|
"org_address",
|
||||||
|
"director_name",
|
||||||
|
("mfo", "bank_account"),
|
||||||
|
"certificate_file",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -16,6 +60,49 @@ class CustomerAdmin(ModelAdmin):
|
|||||||
class PropertyOwnerAdmin(ModelAdmin):
|
class PropertyOwnerAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"owner_type",
|
||||||
|
"first_name",
|
||||||
|
"last_name",
|
||||||
|
"jshshir",
|
||||||
|
"inn",
|
||||||
|
"org_name",
|
||||||
|
"created_at",
|
||||||
|
)
|
||||||
|
list_filter = ("owner_type",)
|
||||||
|
search_fields = (
|
||||||
|
"first_name",
|
||||||
|
"last_name",
|
||||||
|
"jshshir",
|
||||||
|
"passport_number",
|
||||||
|
"inn",
|
||||||
|
"org_name",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
fieldsets = (
|
||||||
|
("Umumiy", {
|
||||||
|
"fields": ("owner_type",),
|
||||||
|
}),
|
||||||
|
("Jismoniy shaxs", {
|
||||||
|
"fields": (
|
||||||
|
"jshshir",
|
||||||
|
("passport_series", "passport_number"),
|
||||||
|
("first_name", "last_name", "middle_name"),
|
||||||
|
"address",
|
||||||
|
("passport_issued_date", "passport_issued_by"),
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Yuridik shaxs", {
|
||||||
|
"fields": (
|
||||||
|
"inn",
|
||||||
|
"org_name",
|
||||||
|
"org_address",
|
||||||
|
"director_name",
|
||||||
|
("mfo", "bank_account"),
|
||||||
|
"certificate_file",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,38 @@ from core.apps.evaluation.models import ValuationDocumentModel
|
|||||||
|
|
||||||
|
|
||||||
@admin.register(ValuationDocumentModel)
|
@admin.register(ValuationDocumentModel)
|
||||||
class ValuationdocumentAdmin(ModelAdmin):
|
class ValuationDocumentAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"valuation",
|
||||||
|
"document_type",
|
||||||
|
"title",
|
||||||
|
"uploaded_by",
|
||||||
|
"created_at",
|
||||||
|
)
|
||||||
|
list_filter = ("document_type",)
|
||||||
|
search_fields = (
|
||||||
|
"title",
|
||||||
|
"description",
|
||||||
|
"valuation__conclusion_number",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
raw_id_fields = ("valuation", "uploaded_by")
|
||||||
|
fieldsets = (
|
||||||
|
("Hujjat", {
|
||||||
|
"fields": (
|
||||||
|
"valuation",
|
||||||
|
"document_type",
|
||||||
|
"title",
|
||||||
|
"file",
|
||||||
|
"uploaded_by",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Qo'shimcha", {
|
||||||
|
"fields": ("description",),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,8 +5,46 @@ from core.apps.evaluation.models import MovablePropertyEvaluationModel
|
|||||||
|
|
||||||
|
|
||||||
@admin.register(MovablePropertyEvaluationModel)
|
@admin.register(MovablePropertyEvaluationModel)
|
||||||
class MovablepropertyevaluationAdmin(ModelAdmin):
|
class MovablePropertyEvaluationAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"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")
|
||||||
|
raw_id_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"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,8 +5,58 @@ from core.apps.evaluation.models import QuickEvaluationModel
|
|||||||
|
|
||||||
|
|
||||||
@admin.register(QuickEvaluationModel)
|
@admin.register(QuickEvaluationModel)
|
||||||
class QuickevaluationAdmin(ModelAdmin):
|
class QuickEvaluationAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"created_by",
|
||||||
|
"brand",
|
||||||
|
"model",
|
||||||
|
"license_plate",
|
||||||
|
"manufacture_year",
|
||||||
|
"condition",
|
||||||
|
"estimated_price",
|
||||||
|
"created_at",
|
||||||
|
)
|
||||||
|
list_filter = (
|
||||||
|
"fuel_type",
|
||||||
|
"body_type",
|
||||||
|
"condition",
|
||||||
|
)
|
||||||
|
search_fields = (
|
||||||
|
"brand",
|
||||||
|
"model",
|
||||||
|
"license_plate",
|
||||||
|
"vin_number",
|
||||||
|
"engine_number",
|
||||||
|
"tech_passport_number",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
raw_id_fields = ("created_by",)
|
||||||
|
fieldsets = (
|
||||||
|
("Foydalanuvchi", {
|
||||||
|
"fields": ("created_by",),
|
||||||
|
}),
|
||||||
|
("Transport ma'lumotlari", {
|
||||||
|
"fields": (
|
||||||
|
"tech_passport_number",
|
||||||
|
"license_plate",
|
||||||
|
("brand", "model"),
|
||||||
|
("manufacture_year", "color"),
|
||||||
|
("vin_number", "engine_number"),
|
||||||
|
"mileage",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Texnik holat", {
|
||||||
|
"fields": (
|
||||||
|
("fuel_type", "body_type"),
|
||||||
|
"condition",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Natija", {
|
||||||
|
"fields": ("estimated_price",),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,8 +5,56 @@ from core.apps.evaluation.models import RealEstateEvaluationModel
|
|||||||
|
|
||||||
|
|
||||||
@admin.register(RealEstateEvaluationModel)
|
@admin.register(RealEstateEvaluationModel)
|
||||||
class RealestateevaluationAdmin(ModelAdmin):
|
class RealEstateEvaluationAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"valuation",
|
||||||
|
"property_type",
|
||||||
|
"address",
|
||||||
|
"total_area",
|
||||||
|
"floor",
|
||||||
|
"build_year",
|
||||||
|
"condition",
|
||||||
|
)
|
||||||
|
list_filter = (
|
||||||
|
"property_type",
|
||||||
|
"condition",
|
||||||
|
"has_renovation",
|
||||||
|
)
|
||||||
|
search_fields = (
|
||||||
|
"address",
|
||||||
|
"cadastral_number",
|
||||||
|
"valuation__conclusion_number",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
raw_id_fields = ("valuation",)
|
||||||
|
fieldsets = (
|
||||||
|
("Ariza", {
|
||||||
|
"fields": ("valuation",),
|
||||||
|
}),
|
||||||
|
("Mulk ma'lumotlari", {
|
||||||
|
"fields": (
|
||||||
|
"property_type",
|
||||||
|
"address",
|
||||||
|
"cadastral_number",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Texnik parametrlar", {
|
||||||
|
"fields": (
|
||||||
|
("total_area", "living_area"),
|
||||||
|
("floor", "total_floors"),
|
||||||
|
"rooms_count",
|
||||||
|
"build_year",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Holat", {
|
||||||
|
"fields": (
|
||||||
|
"condition",
|
||||||
|
"has_renovation",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,8 +5,46 @@ from core.apps.evaluation.models import EvaluationReportModel
|
|||||||
|
|
||||||
|
|
||||||
@admin.register(EvaluationReportModel)
|
@admin.register(EvaluationReportModel)
|
||||||
class EvaluationreportAdmin(ModelAdmin):
|
class EvaluationReportAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"report_number",
|
||||||
|
"valuation",
|
||||||
|
"evaluator",
|
||||||
|
"final_value",
|
||||||
|
"approved_at",
|
||||||
|
"created_at",
|
||||||
|
)
|
||||||
|
list_filter = ("approved_at",)
|
||||||
|
search_fields = (
|
||||||
|
"report_number",
|
||||||
|
"valuation__conclusion_number",
|
||||||
|
"evaluator__phone",
|
||||||
|
"evaluator__first_name",
|
||||||
|
"conclusion_text",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
raw_id_fields = ("valuation", "evaluator")
|
||||||
|
fieldsets = (
|
||||||
|
("Hisobot", {
|
||||||
|
"fields": (
|
||||||
|
"report_number",
|
||||||
|
"valuation",
|
||||||
|
"evaluator",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Natija", {
|
||||||
|
"fields": (
|
||||||
|
"final_value",
|
||||||
|
"conclusion_text",
|
||||||
|
"report_file",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Tasdiqlash", {
|
||||||
|
"fields": ("approved_at",),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,5 +8,66 @@ from core.apps.evaluation.models import ValuationModel
|
|||||||
class ValuationAdmin(ModelAdmin):
|
class ValuationAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"conclusion_number",
|
||||||
|
"evaluation_type",
|
||||||
|
"status",
|
||||||
|
"customer",
|
||||||
|
"assigned_to",
|
||||||
|
"estimated_price",
|
||||||
|
"final_price",
|
||||||
|
"payment_status",
|
||||||
|
"created_at",
|
||||||
|
)
|
||||||
|
list_filter = (
|
||||||
|
"evaluation_type",
|
||||||
|
"status",
|
||||||
|
"payment_status",
|
||||||
|
"evaluation_purpose",
|
||||||
|
"is_courier_delivery",
|
||||||
|
)
|
||||||
|
search_fields = (
|
||||||
|
"conclusion_number",
|
||||||
|
"customer__first_name",
|
||||||
|
"customer__last_name",
|
||||||
|
"customer__org_name",
|
||||||
|
"customer__inn",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
raw_id_fields = ("customer", "property_owner", "created_by", "assigned_to")
|
||||||
|
fieldsets = (
|
||||||
|
("Asosiy ma'lumotlar", {
|
||||||
|
"fields": (
|
||||||
|
"conclusion_number",
|
||||||
|
("evaluation_type", "evaluation_subtype"),
|
||||||
|
"evaluation_purpose",
|
||||||
|
"status",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Bog'lanishlar", {
|
||||||
|
"fields": (
|
||||||
|
"customer",
|
||||||
|
"property_owner",
|
||||||
|
"created_by",
|
||||||
|
"assigned_to",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Narx va To'lov", {
|
||||||
|
"fields": (
|
||||||
|
("estimated_price", "final_price"),
|
||||||
|
"payment_status",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Yetkazib berish", {
|
||||||
|
"fields": (
|
||||||
|
"is_courier_delivery",
|
||||||
|
"courier_extra_amount",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Qo'shimcha", {
|
||||||
|
"fields": ("notes",),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,5 +8,55 @@ from core.apps.evaluation.models import VehicleModel
|
|||||||
class VehicleAdmin(ModelAdmin):
|
class VehicleAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"brand",
|
||||||
|
"model",
|
||||||
|
"license_plate",
|
||||||
|
"manufacture_year",
|
||||||
|
"color",
|
||||||
|
"fuel_type",
|
||||||
|
"condition",
|
||||||
|
"mileage",
|
||||||
|
)
|
||||||
|
list_filter = (
|
||||||
|
"fuel_type",
|
||||||
|
"body_type",
|
||||||
|
"condition",
|
||||||
|
"manufacture_year",
|
||||||
|
)
|
||||||
|
search_fields = (
|
||||||
|
"brand",
|
||||||
|
"model",
|
||||||
|
"license_plate",
|
||||||
|
"vin_number",
|
||||||
|
"engine_number",
|
||||||
|
"tech_passport_number",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
fieldsets = (
|
||||||
|
("Texnik passport", {
|
||||||
|
"fields": (
|
||||||
|
("tech_passport_series", "tech_passport_number"),
|
||||||
|
("tech_passport_issued_date", "tech_passport_issued_by"),
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Transport ma'lumotlari", {
|
||||||
|
"fields": (
|
||||||
|
("brand", "model"),
|
||||||
|
"license_plate",
|
||||||
|
("manufacture_year", "color"),
|
||||||
|
("vin_number", "engine_number"),
|
||||||
|
"position",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Texnik holat", {
|
||||||
|
"fields": (
|
||||||
|
("fuel_type", "body_type"),
|
||||||
|
"condition",
|
||||||
|
"mileage",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,5 +8,48 @@ from core.apps.payment.models import PaymentModel
|
|||||||
class PaymentAdmin(ModelAdmin):
|
class PaymentAdmin(ModelAdmin):
|
||||||
list_display = (
|
list_display = (
|
||||||
"id",
|
"id",
|
||||||
"__str__",
|
"valuation",
|
||||||
|
"payer",
|
||||||
|
"amount",
|
||||||
|
"payment_method",
|
||||||
|
"status",
|
||||||
|
"transaction_id",
|
||||||
|
"paid_at",
|
||||||
|
"created_at",
|
||||||
|
)
|
||||||
|
list_filter = (
|
||||||
|
"status",
|
||||||
|
"payment_method",
|
||||||
|
)
|
||||||
|
search_fields = (
|
||||||
|
"transaction_id",
|
||||||
|
"valuation__conclusion_number",
|
||||||
|
"payer__phone",
|
||||||
|
"payer__first_name",
|
||||||
|
"note",
|
||||||
|
)
|
||||||
|
readonly_fields = ("created_at", "updated_at")
|
||||||
|
raw_id_fields = ("valuation", "payer")
|
||||||
|
fieldsets = (
|
||||||
|
("To'lov ma'lumotlari", {
|
||||||
|
"fields": (
|
||||||
|
"valuation",
|
||||||
|
"payer",
|
||||||
|
("amount", "payment_method"),
|
||||||
|
"status",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Tranzaksiya", {
|
||||||
|
"fields": (
|
||||||
|
"transaction_id",
|
||||||
|
"paid_at",
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
("Qo'shimcha", {
|
||||||
|
"fields": ("note",),
|
||||||
|
}),
|
||||||
|
("Tizim", {
|
||||||
|
"classes": ("collapse",),
|
||||||
|
"fields": ("created_at", "updated_at"),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user