Prepare operating account health for support integration

This commit is contained in:
metatroncubeswdev 2026-08-30 11:03:54 -04:00
parent da7df6c1d6
commit 84b23c268e
4 changed files with 105 additions and 11 deletions

View File

@ -396,6 +396,17 @@ This is expected until monthly revenue/cost source data is populated in live rec
7. Dashboard visuals are implemented as an Odoo client action with cards, bars, and tables. It is not a spreadsheet-style BI dashboard and does not yet use external charting libraries. 7. Dashboard visuals are implemented as an Odoo client action with cards, bars, and tables. It is not a spreadsheet-style BI dashboard and does not yet use external charting libraries.
8. Some seeded legacy setup records had live drift. CRM/project static setup XML was marked `noupdate` to avoid duplicate/unique conflicts during upgrades. 8. Some seeded legacy setup records had live drift. CRM/project static setup XML was marked `noupdate` to avoid duplicate/unique conflicts during upgrades.
## V2.1 Support Forward Compatibility
The future Client Support System is intentionally deferred to MCS Operating System V2.1 and is not part of the CEO Dashboard V2 completion scope.
Account health was refactored to support future signals through:
- `_mcs_get_account_health_signals(projects)`
- `_mcs_resolve_account_health(signals)`
Future Helpdesk/support metrics should extend those methods instead of replacing the client-account model or duplicating account-health logic.
## Not Fully Implemented From Specification ## Not Fully Implemented From Specification
- Fully automatic opportunity-won sale order creation. - Fully automatic opportunity-won sale order creation.

View File

@ -0,0 +1,58 @@
# V2.1 Support Forward Compatibility
Date: 2026-08-30
Addon: `mcs_operating_system`
## Scope
This note records the forward-compatibility decision for the future MCS Operating System V2.1 Client Support System.
The support/helpdesk system is intentionally not implemented in CEO Dashboard V2. V2 remains focused on the CEO command center, operating dashboard, client-account rollups, project health, capacity, revenue, CEO actions, and internal bets.
## Future Direction
When V2.1 is implemented, first inspect whether Odoo Helpdesk is installed and available.
Preferred approach:
- Extend Odoo native Helpdesk if available.
- Avoid creating duplicate ticket infrastructure unless there is a clear technical reason.
- If Helpdesk is unavailable, document that fact before implementing an alternative.
## Account Health Extension Point
Client account health now routes through extension methods on `res.partner`:
- `_mcs_get_account_health_signals(projects)`
- `_mcs_resolve_account_health(signals)`
CEO Dashboard V2 currently uses project/workstream health as the account-health input.
V2.1 should extend `_mcs_get_account_health_signals` to add support signals such as:
- open support tickets
- critical P0/P1 tickets
- overdue tickets
- SLA breaches
- average first-response time
- average resolution time
- unresolved ticket age
- repeated incidents
- reopened tickets
V2.1 should then update `_mcs_resolve_account_health` only as needed to account for those additional support signals.
## Deferred Support Scope
The following are intentionally deferred to V2.1:
- Support ticket model or Helpdesk extension
- Ticket priorities, categories, teams, and SLA rules
- Client portal ticket submission
- Ticket-to-project-task workflow
- Change-request-to-quotation workflow
- Support time tracking metrics
- Support health dashboard section
- Support health influence on account health
These are not considered missing from CEO Dashboard V2 because they are intentionally scheduled for V2.1.

View File

@ -113,14 +113,34 @@ class ResPartner(models.Model):
if partner.mcs_monthly_hours if partner.mcs_monthly_hours
else 0 else 0
) )
partner.mcs_account_health = partner._mcs_resolve_account_health(
partner._mcs_get_account_health_signals(projects)
)
def _mcs_get_account_health_signals(self, projects):
"""Return health signals used to resolve client account health.
V2.1 support/helpdesk integration should extend this method and add
ticket/SLA signals instead of replacing the account rollup model.
"""
health_values = set(projects.mapped("mcs_portfolio_health")) health_values = set(projects.mapped("mcs_portfolio_health"))
if "blocked" in health_values: return {
partner.mcs_account_health = "blocked" "has_projects": bool(projects),
elif "at_risk" in health_values: "project_health_values": health_values,
partner.mcs_account_health = "at_risk" "has_blocked_project": "blocked" in health_values,
elif "watch" in health_values: "has_at_risk_project": "at_risk" in health_values,
partner.mcs_account_health = "watch" "has_watch_project": "watch" in health_values,
elif projects and health_values == {"completed"}: "all_projects_completed": bool(projects) and health_values == {"completed"},
partner.mcs_account_health = "completed" }
else:
partner.mcs_account_health = "healthy" def _mcs_resolve_account_health(self, signals):
"""Resolve account health from extensible management signals."""
if signals.get("has_blocked_project"):
return "blocked"
if signals.get("has_at_risk_project"):
return "at_risk"
if signals.get("has_watch_project"):
return "watch"
if signals.get("all_projects_completed"):
return "completed"
return "healthy"

View File

@ -35,6 +35,11 @@ class TestCeoDashboardV2(TransactionCase):
self.assertEqual(self.partner.mcs_monthly_revenue, 100000) self.assertEqual(self.partner.mcs_monthly_revenue, 100000)
self.assertEqual(self.partner.mcs_contracted_value, 80000) self.assertEqual(self.partner.mcs_contracted_value, 80000)
def test_account_health_uses_extensible_signals(self):
signals = self.partner._mcs_get_account_health_signals(self.project)
self.assertIn("project_health_values", signals)
self.assertEqual(self.partner._mcs_resolve_account_health(signals), "healthy")
def test_ceo_action_workflow(self): def test_ceo_action_workflow(self):
action = self.env["mcs.ceo.action"].create( action = self.env["mcs.ceo.action"].create(
{ {