1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Test and cover treasury app

This commit is contained in:
Yohann D'ANELLO
2020-09-04 15:53:00 +02:00
parent b6847415b5
commit c03c18e93a
20 changed files with 438 additions and 31 deletions

View File

@ -24,9 +24,7 @@ class RemittanceAdmin(admin.ModelAdmin):
list_display = ('remittance_type', 'date', 'comment', 'count', 'amount', 'closed', )
def has_change_permission(self, request, obj=None):
if not obj:
return True
return not obj.closed and super().has_change_permission(request, obj)
return not obj or (not obj.closed and super().has_change_permission(request, obj))
@admin.register(SogeCredit, site=admin_site)