feat: add option to archive accounts

This commit is contained in:
Herculino Trotta
2024-10-27 21:54:02 -03:00
parent 9f371c2693
commit bfd0cc45a3
8 changed files with 78 additions and 13 deletions
+9 -1
View File
@@ -60,7 +60,14 @@ class AccountForm(forms.ModelForm):
class Meta:
model = Account
fields = ["name", "group", "currency", "exchange_currency", "is_asset"]
fields = [
"name",
"group",
"currency",
"exchange_currency",
"is_asset",
"is_archived",
]
widgets = {
"currency": TomSelect(),
"exchange_currency": TomSelect(),
@@ -76,6 +83,7 @@ class AccountForm(forms.ModelForm):
"name",
"group",
Switch("is_asset"),
Switch("is_archived"),
"currency",
"exchange_currency",
)