Skip to content

Commit b6919b0

Browse files
Don't use credit_accounting form in geno.
1 parent 4a9943c commit b6919b0

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

django/geno/forms.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,25 @@ def __init__(self, *args, **kwargs):
10261026
)
10271027

10281028

1029+
class TransactionUploadForm(forms.Form):
1030+
file = forms.FileField(
1031+
label="Zahlungsdatei",
1032+
required=False,
1033+
widget=UnfoldAdminFileFieldWidget(),
1034+
help_text="camt.053 oder camt.054 (XML) oder ZIP-Datei mit mehreren XML-Dateien",
1035+
)
1036+
1037+
def __init__(self, *args, **kwargs):
1038+
super().__init__(*args, **kwargs)
1039+
# Add Crispy Forms helper for Unfold styling
1040+
self.helper = FormHelper()
1041+
self.helper.form_tag = False # Form tag handled in template
1042+
self.helper.form_class = ""
1043+
self.helper.layout = Layout(
1044+
Div("file", css_class="mb-4"),
1045+
)
1046+
1047+
10291048
class TransactionUploadFileForm(forms.Form):
10301049
file = forms.FileField(required=False)
10311050

django/geno/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from requests_oauthlib import OAuth2Session
3333
from stdnum.ch import esr
3434

35-
from credit_accounting.forms import TransactionUploadForm
3635
from finance.accounting import Account, AccountingManager, AccountKey
3736

3837
if hasattr(settings, "SHARE_PLOT") and settings.SHARE_PLOT:
@@ -86,6 +85,7 @@
8685
ShareStatementForm,
8786
TransactionForm,
8887
TransactionFormInvoice,
88+
TransactionUploadForm,
8989
TransactionUploadProcessForm,
9090
WebstampForm,
9191
process_registration_forms,

0 commit comments

Comments
 (0)