123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- from django.contrib import admin
- from .models import *
- @admin.register(Company)
- class CompanyAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'legal_name',
- 'repr_id',
- 'inn',
- 'kpp',
- 'ogrn',
- 'bank_name',
- 'bik',
- 'ks',
- 'rs',
- 'address',
- 'requirements',
- 'status',
- 'ticket_status',
- 'id_metaservice',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('repr_id', 'ticket_status')
- @admin.register(Permissions)
- class PermissionsAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'check_date',
- 'id_permissions',
- 'check_level',
- 'checked_by',
- 'user_id',
- 'status',
- 'ticket_status',
- 'id_metaservice',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('check_date', 'checked_by', 'user_id', 'ticket_status')
- @admin.register(ServiceType)
- class ServiceTypeAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'codename',
- 'caption',
- 'description',
- 'requirements',
- 'price_type',
- 'status',
- 'ticket_status',
- 'id_metaservice',
- 'link_agreement',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('ticket_status',)
- @admin.register(Provider)
- class ProviderAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'type',
- 'company_id',
- 'user_id',
- 'id_metaservice',
- 'requirements',
- 'status',
- 'ticket_status',
- 'location_type',
- 'default_location',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('company_id', 'user_id', 'ticket_status')
- @admin.register(Resource)
- class ResourceAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'type_id',
- 'user_id',
- 'requirements',
- 'status',
- 'ticket_status',
- 'id_metaservice',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('user_id', 'ticket_status')
- @admin.register(Service)
- class ServiceAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'servicetype_id',
- 'id_provider',
- 'resource_id',
- 'requirements',
- 'id_metaservice',
- 'price_alg',
- 'price_km',
- 'price_min',
- 'price_amount',
- 'service_status',
- 'status',
- 'ticket_status',
- 'is_global',
- 'is_visible',
- )
- list_filter = (
- 'servicetype_id',
- 'id_provider',
- 'resource_id',
- 'ticket_status',
- )
- @admin.register(Documents)
- class DocumentsAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'check_date',
- 'check_level',
- 'expire_date',
- 'id_metaservice',
- 'requirements',
- 'status',
- 'ticket_status',
- 'datalink',
- 'doc_type',
- 'user_id',
- 'company_id',
- 'is_global',
- 'is_visible',
- 'checked_by',
- )
- list_filter = (
- 'check_date',
- 'expire_date',
- 'ticket_status',
- 'user_id',
- 'company_id',
- 'checked_by',
- )
- @admin.register(Client)
- class ClientAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'user',
- 'requirements',
- 'status',
- 'ticket_status',
- 'id_metaservice',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('user', 'ticket_status')
- @admin.register(Orders)
- class OrdersAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'service',
- 'service_type',
- 'state',
- 'id_metaservice',
- 'provider',
- 'receiver',
- 'client_id',
- 'time_created',
- 'time_placed',
- 'time_start',
- 'time_finish_predicted',
- 'time_finish_real',
- 'ticket',
- 'predicted_price',
- 'real_price',
- 'is_global',
- 'is_visible',
- )
- list_filter = (
- 'service',
- 'service_type',
- 'provider',
- 'receiver',
- 'client_id',
- 'time_created',
- 'time_placed',
- 'time_start',
- 'time_finish_predicted',
- 'time_finish_real',
- )
- @admin.register(Relationship)
- class RelationshipAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'user_id_who',
- 'user_id_whom',
- 'neg_type',
- 'id_metaservice',
- 'requirements',
- 'status',
- 'ticket_status',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('user_id_who', 'user_id_whom', 'ticket_status')
|