Files
Odoo-Modules/fusion_plating/fusion_plating_bridge_documents
gsinghpal f4e1f9d218 refactor(plating-sec): extend ACL sweep to 13 missed modules
The Phase B plan (commit 8eb2c2de) listed 12 modules to sweep, but the
codebase has 13 more modules with ACL CSVs referencing the old role
group xmlids. Backward-compat (Phase A's implied_ids chains) keeps
these working today, but the old groups will be deleted after the
30-day rollback window — so the sweep must cover ALL modules with
plating-group ACL refs to avoid post-rollback breakage.

Sweeps: batch, bridge_documents, bridge_maintenance, bridge_mrp
(uninstalled but file present), bridge_quality (planned removal),
bridge_sign, compliance, culture (retired), kpi, logistics,
notifications, portal, reports.

Pattern matches the original sweep:
  group_fusion_plating_operator → group_fp_technician
  group_fusion_plating_supervisor → group_fp_shop_manager_v2
  group_fusion_plating_manager → group_fp_manager
  group_fusion_plating_admin → group_fp_owner
  group_fp_accounting → group_fp_manager
  group_fp_receiving → group_fp_shop_manager_v2
  group_fp_estimator → group_fp_sales_rep
  group_fp_shop_manager (legacy) → group_fp_manager
  cgp_officer → group_fp_quality_manager
  cgp_designated_official → group_fp_owner

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 01:18:52 -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
2026-04-16 20:53:53 -04:00
2026-04-16 20:53:53 -04:00

Fusion Plating — Documents Bridge (Enterprise)

Part of the Fusion Plating product family by Nexa Systems Inc.

What this module does

When both fusion_plating_quality and Odoo Enterprise's documents module are installed, this bridge auto-installs and wires the two together so that every attachment dropped on a Fusion Plating quality record (NCR, CAPA, FAIR, or Controlled Document) is automatically mirrored into a dedicated Documents workspace with the right tag applied.

No manual file uploads, no duplicate copies to keep in sync — the bridge takes care of it on ir.attachment.create().

What it creates

  • Workspace: Plating — Quality (a documents.document with type='folder')
  • Facet: Record Type (a documents.facet scoped to the workspace)
  • Tags: NCR, CAPA, FAIR, Doc Control under that facet
  • Smart button: a Documents stat button on every NCR / CAPA / FAIR / Controlled Document form view, opening the filtered Documents kanban for that record

How it works

  1. A user attaches a file to an NCR (or any of the other supported records) via the chatter or a wizard.
  2. The bridge's ir.attachment.create() override inspects res_model and, if it matches one of the supported quality models, creates a mirror documents.document record:
    • Placed inside the Plating — Quality workspace
    • Tagged with the corresponding record type tag
    • Linked back to the original ir.attachment via attachment_id
  3. On the quality record form, the smart button reads a computed Many2many (x_fc_document_ids) that searches documents.document by the underlying attachment's res_model + res_id — no duplication, no storage overhead.

Safety & robustness

  • The bridge never blocks attachment creation. Any exception raised while creating the mirror documents.document record is caught and logged — the user's upload always succeeds.
  • All references to the workspace folder and tags use env.ref(..., raise_if_not_found=False). If the data records are ever removed or renamed, the bridge degrades gracefully (no mirror created, logged warning).
  • The bridge never modifies fusion_plating, fusion_plating_quality, or the EE documents module. It is purely additive.

Dependencies

  • fusion_plating_quality
  • documents (Odoo Enterprise)

Auto-install

auto_install = True — the bridge installs automatically whenever both dependencies are present in the same database, and stays dormant otherwise.

Copyright 2026 Nexa Systems Inc. All rights reserved. Licensed under OPL-1 (Odoo Proprietary License v1.0).