Back to Feature Requests

Per-combined-portfolio display currency override

Under Review
Submitted May 28, 2026 by Allinvestview

Today CombinedPortfolio has no display-currency field. When a combined portfolio is the active scope, the dashboard and every downstream view falls back to the account default currency. Households that mix currencies (e.g. EUR/CHF/USD individuals viewed as a single GBP household) cannot get the combined view in their reporting currency without also changing the account default, which then forces every individual portfolio without an explicit override to flip too.

Reported by user on ticket #145.

Proposed scope:
- Add `currency` CharField(null, blank) to CombinedPortfolio.
- Add a 'Display Currency' dropdown to BOTH the Add and Edit Combined Portfolio modals on /manage_portfolios/, plus a matching field accepted by add_combined_portfolio and edit_combined_portfolio in views.py.
- Centralise selection: extend get_display_currency(portfolio, user_settings, combined=None) in bondapp/utils.py so every caller routes through one helper. Today the fallback to user_settings.default_currency lives in ~30 places (dashboard, options dashboard, view_stocks, rebalance, advisor, dividend report, bond report, CGT, modelo 720, cash account, weekly email digest, etc.). All of those need to honour the combined override.
- Mobile API parity: bondapp/api/views/dashboard.py around line 262-264 currently gates the per-portfolio override on `not combined_portfolio_active`. The combined override needs to be honoured here and across the other mobile endpoints (cash.py, categories.py, stock_details.py, bonds.py, watchlist.py, portfolio.py, reports.py, rebalance.py). Add a parity test per CALCULATION_PARITY.md.
- Expose `currency` on the mobile serializer for CombinedPortfolio (bondapp/api/serializers/auth.py:95-138).
- Analytics cache key in bondapp/utils_stocks.py:1149 must include the combined currency so cached analytics_v4_* do not serve stale values after a switch.
- Decision needed: does the combined override also drive cash_account_currency (bondapp/views.py:8304)? Default to yes for consistency.
- Migration adding the field uses a no-override default (null/blank), so the DB-level batch update does not change any user's effective currency. Mobile dashboard cache signals (already wired on CombinedPortfolio in bondapp/signals.py) will invalidate correctly on subsequent edits.

0 votes

Discussion (0 comments)

  • No comments yet. Be the first to share your thoughts!

Leave a Comment