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:
alpcentaur 2023-02-27 17:09:29 +00:00
parent e32cc87f63
commit cf784a05f1
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'