Files
Odoo-Modules/fusion_plating/fusion_plating_bridge_mrp
gsinghpal 095d9f487c feat(bridge_mrp): SO workflow stage + contextual buttons (CHUNK 3/4)
Sale Order form now guides the user through the next step without
making them navigate between screens.

New computed field sale.order.x_fc_workflow_stage with 12 stages:
  draft → awaiting_parts → inspecting → accept_parts → assign_work
       → in_production → ready_to_ship → shipped → invoicing
       → paid → complete (+ cancelled)

Driven by SO.state + x_fc_receiving_status + MO state +
delivery.state + invoice payment state.

Five contextual header buttons (only 1-2 visible at any time,
fusion_claims pattern — invisible="x_fc_workflow_stage != 'foo'"):

  Mark Inspecting       → flips receiving to 'inspecting'
  Accept Parts          → flips receiving to 'accepted' + SO status
                          to 'inspected', unlocks manager assignment
  Assign To Me & Release → manager claims the job, confirms all draft
                          MOs (which auto-generates WOs already)
  Open Shop Floor       → jumps to Plant Overview during production
  Mark Shipped          → closes open delivery records → triggers
                          auto-invoice per strategy

Info banner shows current stage + assigned manager on the sheet so
users always know where they are.

New fields:
  sale.order.x_fc_assigned_manager_id (Many2one res.users, tracked)
  mrp.production.x_fc_assigned_manager_id (Many2one, propagated on
                                           MO confirm)

MO.action_confirm() now pulls the assigned manager from the SO (or
falls back to SO.user_id) and sets it on the MO — sets up the
Manager Dashboard (chunk 2) and role-based assignment (chunk 4) to
filter "my jobs" cleanly.

Smoke-tested across 10 demo SOs — stages compute correctly:
  S00028 → ready_to_ship, S00027-25 → awaiting_parts,
  S00023-20 → complete/shipped, S00029 → draft.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 19:57:41 -04:00
..
2026-04-16 20:53:53 -04:00
2026-04-16 20:53:53 -04:00
2026-04-16 20:53:53 -04:00