diff --git a/nummi/main/models.py b/nummi/main/models.py index 5d8cb3c..e080242 100644 --- a/nummi/main/models.py +++ b/nummi/main/models.py @@ -75,7 +75,7 @@ class Account(CustomModel): return Snapshot.objects.filter(account=self) class Meta: - ordering = ["name"] + ordering = ["-default", "name"] verbose_name = _("Account") verbose_name_plural = _("Accounts") @@ -197,7 +197,7 @@ class Snapshot(AccountModel): return reverse("del_snapshot", kwargs={"pk": self.pk}) class Meta: - ordering = ["-date"] + ordering = ["-date", "account"] verbose_name = _("Statement") verbose_name_plural = _("Statements") @@ -267,7 +267,7 @@ class Transaction(CustomModel): return self.invoices.count() > 0 class Meta: - ordering = ["-date"] + ordering = ["-date", "snapshot"] verbose_name = _("Transaction") verbose_name_plural = _("Transactions") @@ -316,3 +316,4 @@ class Invoice(CustomModel): class Meta: verbose_name = _("Invoice") verbose_name_plural = _("Invoices") + ordering = ["transaction", "name"]