Order form fields - closes #2

This commit is contained in:
Edgar P. Burkhart 2022-12-31 09:57:34 +01:00
parent ce28f6d0b6
commit 34d5ce647c
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -24,13 +24,26 @@ class AccountForm(NummiForm):
class CategoryForm(NummiForm): class CategoryForm(NummiForm):
class Meta: class Meta:
model = Category model = Category
fields = "__all__" fields = [
"name",
"icon",
]
class TransactionForm(NummiForm): class TransactionForm(NummiForm):
class Meta: class Meta:
model = Transaction model = Transaction
fields = "__all__" fields = [
"snapshot",
"name",
"value",
"date",
"real_date",
"category",
"trader",
"payment",
"description",
]
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
_user = kwargs.get("user") _user = kwargs.get("user")
@ -44,13 +57,16 @@ class InvoiceForm(NummiForm):
class Meta: class Meta:
model = Invoice model = Invoice
fields = "__all__" fields = [
"name",
"file",
]
class SnapshotForm(NummiForm): class SnapshotForm(NummiForm):
class Meta: class Meta:
model = Snapshot model = Snapshot
fields = "__all__" fields = ["account", "start_date", "date", "start_value", "value", "file"]
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
_user = kwargs.get("user") _user = kwargs.get("user")