1
0
Fork 0

search fields for travel and honorary are using foreign keys now, with the notation of double underscores

This commit is contained in:
Benni Bärmann 2022-12-12 10:26:19 +00:00
parent f2d65e5934
commit f8e8d093c1
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ class AccountAdmin(admin.ModelAdmin):
@admin.register(HonoraryCertificate)
class HonoraryCertificateAdmin(admin.ModelAdmin):
save_as = True
search_fields = ['realname', 'granted']
search_fields = ['realname', 'granted', 'project__name', 'project__pid']
list_display = ('realname', 'granted','project')
date_hierarchy = 'granted_date'
autocomplete_fields = ['project']
@ -92,7 +92,7 @@ class IFGAdmin(admin.ModelAdmin):
@admin.register(Travel)
class TravelAdmin(admin.ModelAdmin):
save_as = True
search_fields = ['realname', 'service_id', 'granted_date']
search_fields = ['realname', 'service_id', 'granted_date', 'project__name', 'project__pid']
list_display = ('realname', 'service_id', 'granted', 'granted_date', 'project_end', 'project', 'project_end_quartal')
list_display_links = ('realname', 'project')
date_hierarchy = 'project_end'