diff --git a/fusion_plating/fusion_plating_shopfloor/controllers/manager_controller.py b/fusion_plating/fusion_plating_shopfloor/controllers/manager_controller.py index 3cd789bd..6befa601 100644 --- a/fusion_plating/fusion_plating_shopfloor/controllers/manager_controller.py +++ b/fusion_plating/fusion_plating_shopfloor/controllers/manager_controller.py @@ -283,9 +283,12 @@ class FpManagerDashboardController(http.Controller): else: pending_accept_sos = 0 + # KPI counts derived from the in-memory split we already have — + # don't re-query (the release-ready filter is a Python compute, + # not a stored column, so SQL search_count can't see it). kpis = { - 'unassigned_wos': MrpWO.search_count(domain_unassigned), - 'active_wos': MrpWO.search_count(domain_active), + 'unassigned_wos': len(unassigned_wos), + 'active_wos': len(active_wos), 'ready_to_ship_mos': Production.search_count([ ('state', '=', 'done'), ]) if 'x_fc_portal_job_id' not in Production._fields