Fix no autocomplete on statement transaction creation

Fix 
This commit is contained in:
Edgar P. Burkhart 2025-01-03 19:04:40 +01:00
parent ff519ea7d1
commit 0c5ba6899b
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -31,9 +31,12 @@ class TransactionCreateView(NummiCreateView):
return initial
def get_form_kwargs(self):
form_kwargs = super().get_form_kwargs()
if "statement" in self.kwargs:
return super().get_form_kwargs() | {"disable_statement": True}
return super().get_form_kwargs() | {"autocomplete": True}
form_kwargs["disable_statement"] = True
form_kwargs["autocomplete"] = True
return form_kwargs
class InvoiceCreateView(NummiCreateView):