diff --git a/addons/garment_erp/models/garment_dashboard.py b/addons/garment_erp/models/garment_dashboard.py index b3cc68b..099378a 100644 --- a/addons/garment_erp/models/garment_dashboard.py +++ b/addons/garment_erp/models/garment_dashboard.py @@ -30,6 +30,12 @@ class GarmentDashboard(models.Model): pending_quality_inspections = fields.Integer(string='Pending Quality Inspections', compute='_compute_kpis') active_rework_orders = fields.Integer(string='Open Rework Orders', compute='_compute_kpis') pending_dispatch_cartons = fields.Integer(string='Cartons Ready for Dispatch', compute='_compute_kpis') + + # Extra Telemetry + total_styles_count = fields.Integer(string='Active Styles', compute='_compute_kpis') + total_cutting_orders = fields.Integer(string='Active Cutting Orders', compute='_compute_kpis') + total_bundles_active = fields.Integer(string='Active Bundles in Floor', compute='_compute_kpis') + output_achievement_pct = fields.Float(string='Daily Target Achievement %', compute='_compute_kpis') def _compute_kpis(self): for rec in self: @@ -38,11 +44,18 @@ class GarmentDashboard(models.Model): rec.total_sales_orders = len(orders) rec.total_ordered_pieces = sum(orders.mapped('total_garment_qty')) + # Styles + rec.total_styles_count = self.env['garment.style'].search_count([('active', '=', True)]) + # Production plans = self.env['garment.production.plan'].search([('state', 'in', ['planned', 'in_progress'])]) rec.active_production_plans = len(plans) rec.avg_production_progress = round(sum(plans.mapped('progress_pct')) / (len(plans) or 1), 1) + # Cutting & Bundles + rec.total_cutting_orders = self.env['garment.cutting.plan'].search_count([('state', 'in', ['draft', 'planned', 'cutting'])]) + rec.total_bundles_active = self.env['garment.bundle'].search_count([('stage', 'not in', ['completed'])]) + # Sewing Lines & Today's Hourly lines = self.env['garment.sewing.line'].search([('active', '=', True)]) rec.total_sewing_lines = len(lines) @@ -54,6 +67,11 @@ class GarmentDashboard(models.Model): rec.avg_line_efficiency = round(sum(today_logs.mapped('efficiency_pct')) / len(today_logs), 1) else: rec.avg_line_efficiency = 0.0 + + if rec.today_target_pieces > 0: + rec.output_achievement_pct = min(100.0, round((rec.today_actual_pieces / rec.today_target_pieces) * 100.0, 1)) + else: + rec.output_achievement_pct = 0.0 # Fabric & FG rolls = self.env['garment.fabric.roll'].search([('status', 'in', ['received', 'inspected', 'approved', 'issued'])]) diff --git a/addons/garment_erp/views/garment_dashboard_views.xml b/addons/garment_erp/views/garment_dashboard_views.xml index 2ea777c..a2446b2 100644 --- a/addons/garment_erp/views/garment_dashboard_views.xml +++ b/addons/garment_erp/views/garment_dashboard_views.xml @@ -7,143 +7,499 @@ garment.dashboard
- -
-

Tiruppur Garment Manufacturing - Live Control Center

-
+ - -
-
-
-
Active Orders
-
Orders
-
Total Pieces
-
-
-
-
-
Production in Progress
-
Plans
-
Avg Progress: %
-
-
-
-
-
Today's Sewing Output
-
Pcs
-
Target: Pcs
-
-
-
-
-
Sewing Floor Efficiency
-
%
-
Alterations Logged
-
-
-
+ + - - - +
-
-
- - Fabric Rolls - + +
+ +
+
+
+ LIVE FACTORY TELEMETRY · TIRUPPUR CLUSTER +
+

+ Tiruppur Garment Operations Command Center +

+

+ End-to-End Real-Time Control: Style Tech Packs, 2D Matrix POs, Roll Stores, Lay Cutting, Bundle Travelers, Sewing Efficiency & Export Dispatch +

+
+
+
+
Active Styles
+
+
+
+
Sewing Lines
+
+
+
+
Active Bundles
+
+
+
+
- - - - - -
+ + +
+ +
+
+
+ COMMERCIAL DEMAND +
+ +
+
+
+ Orders +
+
+ Total Booked Pieces + Pcs +
+
+
+ + +
+
+
+ SHOP FLOOR PLANNING +
+ +
+
+
+ Active Plans +
+
+ Average Completion + % +
+
+
+ + +
+
+
+ DAILY SEWING FLOOR +
+ +
+
+
+ Pcs Produced +
+
+ Target: Pcs + Active Shift +
+
+
+ + +
+
+
+ IE EFFICIENCY (SAM) +
+ +
+
+
+ % Efficiency +
+
+ Alteration Audit + Defects Logged +
+
+
+
+ + +
+ +
+
+
+ RAW FABRIC STORES +
+ +
+
+
+ Kg in Stock +
+
+ Approved to Cut + Rolls QC Passed +
+
+
+ + +
+
+
+ FG WAREHOUSE +
+ +
+
+
+ Pcs on Hand +
+
+ Packed in Inventory + Ready to Ship +
+
+
+ + +
+
+
+ EXTERNAL JOB WORK +
+ +
+
+
+ Active DCs +
+
+ Knitting, Dyeing, Print, Wash + In Transit +
+
+
+ + +
+
+
+ DISPATCH & QUALITY +
+ +
+
+
+ Cartons Ready +
+
+ Quality Alterations + Open Reworks +
+
+
+
+ + +
+
+
+ Tiruppur Apparel Manufacturing Lifecycle +
+ Integrated Flow +
+
+
1 2D Matrix PO
+ +
2 Fabric 4-Pt QC
+ +
3 Cutting & Plies
+ +
4 QR Bundles
+ +
5 Sewing Assembly
+ +
6 Job Work DC
+ +
7 Endline QC
+ +
8 Export Carton
+ +
9 Port Dispatch
+
+
+ + + + +