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

@@ -0,0 +1,11 @@
"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 02.08.21
"""
from django.utils.translation import gettext_lazy as _
FORM_INVALID = _("There was an error on this form.")

View File

@@ -18,6 +18,7 @@ from intervention.models import Intervention
from konova.contexts import BaseContext
from konova.forms import RemoveModalForm
from konova.models import Document
from konova.utils.message_templates import FORM_INVALID
from news.models import ServerMessage
from konova.settings import SSO_SERVER_BASE
@@ -150,7 +151,7 @@ def remove_document_view(request: HttpRequest, id: str):
else:
messages.info(
request,
_("There was an error on this form.")
FORM_INVALID
)
return redirect(request.META.get("HTTP_REFERER", "home"))
elif request.method == "GET":