refactor(shopfloor,jobs): consolidate operator UI into shopfloor
Removes the parallel OWL/controller stack I built in fusion_plating_jobs (job_process_tree, job_plant_overview, job_manager_dashboard, job_tablet, job_*.scss, plus parallel controllers and action XML files). Refactors the existing fusion_plating_shopfloor components in place to bind to fp.job / fp.job.step instead of mrp.production / mrp.workorder. End state: - ONE operator UI module (shopfloor) instead of two parallel ones - Existing token system (_fp_shopfloor_tokens.scss) reused as designed - no duplicate jobs tokens - Existing /fp/shopfloor/* RPC URLs preserved (no integration breakage); workorder_id kwargs accepted as legacy aliases for step_id / job_id so older tablet clients keep working - Existing visual designs preserved - only the data layer underneath changed - Process Tree button on fp.job form now points at fusion_plating_shopfloor's fp_process_tree client action - Bake Windows / First-Piece Gates / Bake Oven / Operator Queue models stay where they were - legacy_menu_hide.xml trimmed: only the bridge_mrp Production Priorities entry remains; the 3 shopfloor menus (Manager Desk, Plant Overview, Tablet Station) are now visible (the canonical native consoles) Manifests: - fusion_plating_jobs 19.0.3.1.0 -> 19.0.4.0.0 (consolidation bump, no more bundled JS/SCSS, only job_scan controller retained) - fusion_plating_shopfloor 19.0.14.4.0 -> 19.0.15.0.0 (asset bundle cache-bust + significant controller refactor) Tests pass on entech: 0 failed, 0 errors of 41 tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -546,16 +546,19 @@ class TestPhase6Controllers(TransactionCase):
|
||||
})
|
||||
|
||||
def test_scan_controller_route_registered(self):
|
||||
# Verify the route is registered in the controller registry.
|
||||
# Odoo auto-registers @http.route decorated methods on module load.
|
||||
# We don't HTTP-call from a TransactionCase; just confirm import works.
|
||||
from odoo.addons.fusion_plating_jobs.controllers import job_scan, process_tree
|
||||
# Verify the QR-scan controller is registered. The parallel
|
||||
# process_tree / plant_overview / manager_dashboard / tablet
|
||||
# controllers were consolidated into fusion_plating_shopfloor on
|
||||
# 2026-04-24; the only controller left in this module is
|
||||
# job_scan (the QR-sticker scan redirect).
|
||||
from odoo.addons.fusion_plating_jobs.controllers import job_scan
|
||||
self.assertTrue(hasattr(job_scan, 'FpJobScanController'))
|
||||
self.assertTrue(hasattr(process_tree, 'FpJobProcessTreeController'))
|
||||
|
||||
def test_process_tree_endpoint_logic(self):
|
||||
# Direct method invocation (not HTTP) to verify serialization logic
|
||||
# works for a job with steps + recipe.
|
||||
# The native process_tree endpoint now lives in
|
||||
# fusion_plating_shopfloor (consolidated 2026-04-24). This test
|
||||
# verifies the recipe-node → step lookup that the endpoint
|
||||
# depends on still works for fp.job rows seeded from a recipe.
|
||||
recipe = self.env['fusion.plating.process.node'].create({
|
||||
'name': 'R', 'node_type': 'recipe',
|
||||
})
|
||||
@@ -568,9 +571,6 @@ class TestPhase6Controllers(TransactionCase):
|
||||
'job_id': self.job.id, 'name': 'Op1', 'sequence': 10,
|
||||
'recipe_node_id': op.id,
|
||||
})
|
||||
# Direct call to the controller method body via a fake request
|
||||
# context — in Odoo TransactionCase we can't easily simulate http.request,
|
||||
# so this test just verifies the underlying step-serialization works.
|
||||
step_by_node = {s.recipe_node_id.id: s for s in self.job.step_ids if s.recipe_node_id}
|
||||
self.assertIn(op.id, step_by_node)
|
||||
self.assertEqual(step_by_node[op.id].name, 'Op1')
|
||||
|
||||
Reference in New Issue
Block a user