From a0df7f4fe1a196665c7badf697dbe361c6b80802 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Mon, 15 Nov 2021 11:05:39 +0100 Subject: [PATCH] #38 User requests * implements 1) "Add titles to public reports, next to identifiers" --- .../templates/compensation/report/compensation/report.html | 2 +- .../templates/compensation/report/eco_account/report.html | 2 +- compensation/views/eco_account_views.py | 2 +- intervention/templates/intervention/report/report.html | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compensation/templates/compensation/report/compensation/report.html b/compensation/templates/compensation/report/compensation/report.html index 74d67a58..711ce16d 100644 --- a/compensation/templates/compensation/report/compensation/report.html +++ b/compensation/templates/compensation/report/compensation/report.html @@ -16,7 +16,7 @@ {% trans 'compensates intervention' %} - {{obj.intervention.identifier}} + {{obj.intervention.identifier}} - {{obj.intervention.title}} diff --git a/compensation/templates/compensation/report/eco_account/report.html b/compensation/templates/compensation/report/eco_account/report.html index ff47772d..e71670a1 100644 --- a/compensation/templates/compensation/report/eco_account/report.html +++ b/compensation/templates/compensation/report/eco_account/report.html @@ -29,7 +29,7 @@ {% for deduction in deductions %} - {{deduction.intervention__identifier}} + {{deduction.intervention__identifier}} - {{deduction.intervention__title}}
{% empty %} diff --git a/compensation/views/eco_account_views.py b/compensation/views/eco_account_views.py index e9934d44..521963fc 100644 --- a/compensation/views/eco_account_views.py +++ b/compensation/views/eco_account_views.py @@ -570,7 +570,7 @@ def report_view(request:HttpRequest, id: str): deductions = acc.deductions.all()\ .distinct("intervention")\ .select_related("intervention")\ - .values_list("intervention__id", "intervention__identifier", named=True) + .values_list("intervention__id", "intervention__identifier", "intervention__title", named=True) context = { "obj": acc, diff --git a/intervention/templates/intervention/report/report.html b/intervention/templates/intervention/report/report.html index cf422042..25e6aac6 100644 --- a/intervention/templates/intervention/report/report.html +++ b/intervention/templates/intervention/report/report.html @@ -50,7 +50,7 @@ {% for comp in obj.compensations.all %} - {{comp.identifier}} + {{comp.identifier}} - {{comp.title}}
{% empty %} @@ -63,7 +63,7 @@ {% for deduction in deductions %} - {{deduction.account.identifier}} + {{deduction.account.identifier}} - {{deduction.account.title}}
{% endfor %}