From 5667b847d52710077829ccfb94f22f3d8a3bd939 Mon Sep 17 00:00:00 2001 From: metatroncubeswdev Date: Mon, 31 Aug 2026 17:13:17 -0400 Subject: [PATCH] Fix portfolio zero currency display --- addons/mcs_operating_system/models/dashboard.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/mcs_operating_system/models/dashboard.py b/addons/mcs_operating_system/models/dashboard.py index 657d53a..58bfc30 100644 --- a/addons/mcs_operating_system/models/dashboard.py +++ b/addons/mcs_operating_system/models/dashboard.py @@ -724,6 +724,7 @@ class McsOperatingDashboard(models.Model): continue currencies = invoices.mapped("currency_id") or partner.mcs_currency_id currency_name = " / ".join(currencies.mapped("name")) if currencies else "" + default_currency_ids = currencies.ids invoice_dates = [date for date in invoices.mapped("invoice_date") if date] rows.append( { @@ -735,15 +736,15 @@ class McsOperatingDashboard(models.Model): "revenue": sum(projects.mapped("mcs_monthly_revenue_target")), "total_invoiced": sum(invoices.mapped("amount_total_signed")), "total_invoiced_display": self._invoice_amount_display( - invoices, "amount_total" + invoices, "amount_total", default_currency_ids ), "outstanding": sum(unpaid_invoices.mapped("amount_residual_signed")), "outstanding_display": self._invoice_amount_display( - unpaid_invoices, "amount_residual" + unpaid_invoices, "amount_residual", default_currency_ids ), "overdue": sum(overdue_invoices.mapped("amount_residual_signed")), "overdue_display": self._invoice_amount_display( - overdue_invoices, "amount_residual" + overdue_invoices, "amount_residual", default_currency_ids ), "last_invoice_date": fields.Date.to_string(max(invoice_dates)) if invoice_dates