From 06abac1f43a63eb97c1d8ee45975507bfcfbd6e3 Mon Sep 17 00:00:00 2001 From: Olga Matyla <73503512+matyldv@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:53:27 +0100 Subject: [PATCH] Add property_of to invoice report (#3864) --- src/ralph/assets/invoice_report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ralph/assets/invoice_report.py b/src/ralph/assets/invoice_report.py index ee828377d1..bcfbca8c90 100644 --- a/src/ralph/assets/invoice_report.py +++ b/src/ralph/assets/invoice_report.py @@ -27,7 +27,7 @@ class InvoiceReportMixin(object): _invoice_report_select_related = [] _invoice_report_common_fields = [ - 'invoice_no', 'invoice_date', 'provider', 'price_currency' + 'invoice_no', 'invoice_date', 'provider', 'price_currency', 'property_of__name' ] _price_field = 'price' _invoice_report_name = 'invoice' @@ -122,6 +122,7 @@ def _get_report_data(self, request, queryset): 'datetime': datetime.datetime.now().strftime( self._invoice_report_datetime_format ), + 'property_of': first_item.property_of.name, }, 'items': list(map(self._parse_item, queryset)), 'sum_price': str(