Order form fields - closes #2
This commit is contained in:
parent
ce28f6d0b6
commit
34d5ce647c
1 changed files with 20 additions and 4 deletions
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue