Eco Accounts

* adds related eco account withdraw detail view to intervention detail view
* adds new route for removing withdraws using RemoveModalForm
* adds EcoAccountWithdraw model
* adds admin interfaces for EcoAccount and EcoAccountWithdraw
* adds message_templates.py to konova/utils for reusable messages
* splits related-documents.html and related-objects.html into separate templates for each related object type: compensations.html, documents.html, eco-account-withdraws.html and payments.html
* adds translations
This commit is contained in:
mipel
2021-08-02 10:14:34 +02:00
parent 221f7dfb79
commit 98de05089e
16 changed files with 412 additions and 209 deletions

View File

@@ -1,6 +1,7 @@
from django.contrib import admin
from compensation.models import Compensation, CompensationAction, CompensationState, CompensationControl, Payment
from compensation.models import Compensation, CompensationAction, CompensationState, CompensationControl, Payment, \
EcoAccountWithdraw, EcoAccount
class CompensationControlAdmin(admin.ModelAdmin):
@@ -34,9 +35,23 @@ class CompensationActionAdmin(admin.ModelAdmin):
class CompensationAdmin(admin.ModelAdmin):
list_display = [
"id",
"identifier",
"title",
"created_on",
"created_by",
]
class EcoAccountAdmin(admin.ModelAdmin):
list_display = [
"id",
"identifier",
"title",
"created_on",
"created_by",
]
class PaymentAdmin(admin.ModelAdmin):
list_display = [
"id",
@@ -47,8 +62,21 @@ class PaymentAdmin(admin.ModelAdmin):
]
class EcoAccountWithdrawAdmin(admin.ModelAdmin):
list_display = [
"id",
"account",
"intervention",
"amount",
"created_by",
"created_on",
]
admin.site.register(Compensation, CompensationAdmin)
admin.site.register(Payment, PaymentAdmin)
admin.site.register(CompensationAction, CompensationActionAdmin)
admin.site.register(CompensationState, CompensationStateAdmin)
admin.site.register(CompensationControl, CompensationControlAdmin)
admin.site.register(EcoAccount, EcoAccountAdmin)
admin.site.register(EcoAccountWithdraw, EcoAccountWithdrawAdmin)