locations: тип «Сервис / поставщик» для Вайтер Юг и аналогов.
Выбор в журнале работ и код объекта в it_monthly; сид Вайтер Юг. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -84,12 +84,12 @@ class LocationAdmin(ModelAdmin, ImportExportModelAdmin):
|
||||
css = {'all': ('locations/css/location_admin.css',)}
|
||||
js = ('assets/js/admin_leaflet_resize_fix.js',)
|
||||
|
||||
list_display = ['address_display', 'location_type', 'location_region',
|
||||
list_display = ['address_display', 'name', 'location_type', 'location_region',
|
||||
'coordinates_display', 'is_active', 'updated_at']
|
||||
list_filter = ['location_type', 'is_active', HasCoordinatesFilter]
|
||||
search_fields = ['address', 'street', 'house_number', 'comments']
|
||||
search_fields = ['name', 'address', 'street', 'house_number', 'comments']
|
||||
list_select_related = ['location_region']
|
||||
ordering = ['location_region', 'address']
|
||||
ordering = ['location_type', 'name', 'location_region', 'address']
|
||||
|
||||
# address тепер лише генерується в Location.save() з street/house_number/building/
|
||||
# apartment — ручний ввід сюди все одно перезатреться при збереженні
|
||||
@@ -97,7 +97,11 @@ class LocationAdmin(ModelAdmin, ImportExportModelAdmin):
|
||||
|
||||
fieldsets = (
|
||||
(_('Тип и регион'), {
|
||||
'fields': ('location_type', 'location_region', 'is_active'),
|
||||
'fields': ('location_type', 'name', 'location_region', 'is_active'),
|
||||
'description': _(
|
||||
'«Сервис / поставщик» — обслуживающие организации (Вайтер Юг и т.п.): '
|
||||
'укажите название, адрес по желанию.'
|
||||
),
|
||||
}),
|
||||
(_('Адрес'), {
|
||||
'fields': ('street', 'house_number', 'building', 'apartment', 'address'),
|
||||
|
||||
Reference in New Issue
Block a user