From 3b4061c1b81c4c6d2fb370ce2b8af070a2253c29 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Mon, 21 Oct 2024 15:49:03 -0300 Subject: [PATCH] feat: add account group to item --- app/apps/monthly_overview/views/main.py | 1 + app/templates/transactions/fragments/item.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/apps/monthly_overview/views/main.py b/app/apps/monthly_overview/views/main.py index 7039c92..fc375fa 100644 --- a/app/apps/monthly_overview/views/main.py +++ b/app/apps/monthly_overview/views/main.py @@ -99,6 +99,7 @@ def transactions_list(request, month: int, year: int): .order_by("date_order", "date", "id") .prefetch_related( "account", + "account__group", "category", "tags", "account__exchange_currency", diff --git a/app/templates/transactions/fragments/item.html b/app/templates/transactions/fragments/item.html index 88eb79d..47f2a76 100644 --- a/app/templates/transactions/fragments/item.html +++ b/app/templates/transactions/fragments/item.html @@ -84,7 +84,7 @@ color="grey"> {% endif %} {% endwith %} -
{{ transaction.account.name }}
+
{% if transaction.account.group %}{{ transaction.account.group.name }} • {% endif %}{{ transaction.account.name }}
{# Item actions#}