Update sorting
This commit is contained in:
parent
4c34716992
commit
39b620135a
1 changed files with 4 additions and 3 deletions
|
@ -75,7 +75,7 @@ class Account(CustomModel):
|
||||||
return Snapshot.objects.filter(account=self)
|
return Snapshot.objects.filter(account=self)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["name"]
|
ordering = ["-default", "name"]
|
||||||
verbose_name = _("Account")
|
verbose_name = _("Account")
|
||||||
verbose_name_plural = _("Accounts")
|
verbose_name_plural = _("Accounts")
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ class Snapshot(AccountModel):
|
||||||
return reverse("del_snapshot", kwargs={"pk": self.pk})
|
return reverse("del_snapshot", kwargs={"pk": self.pk})
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["-date"]
|
ordering = ["-date", "account"]
|
||||||
verbose_name = _("Statement")
|
verbose_name = _("Statement")
|
||||||
verbose_name_plural = _("Statements")
|
verbose_name_plural = _("Statements")
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ class Transaction(CustomModel):
|
||||||
return self.invoices.count() > 0
|
return self.invoices.count() > 0
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["-date"]
|
ordering = ["-date", "snapshot"]
|
||||||
verbose_name = _("Transaction")
|
verbose_name = _("Transaction")
|
||||||
verbose_name_plural = _("Transactions")
|
verbose_name_plural = _("Transactions")
|
||||||
|
|
||||||
|
@ -316,3 +316,4 @@ class Invoice(CustomModel):
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("Invoice")
|
verbose_name = _("Invoice")
|
||||||
verbose_name_plural = _("Invoices")
|
verbose_name_plural = _("Invoices")
|
||||||
|
ordering = ["transaction", "name"]
|
||||||
|
|
Loading…
Reference in a new issue