Files
Odoo-Modules/fusion_plating/fusion_plating_quality/__manifest__.py
gsinghpal eed4dc8a78 fix(plating): chatter HTML rendering + workflow stage banner UX
Two fixes from a single SO walkthrough screenshot:

**1. "Current stage" banner**
- Was placed `inside sheet` so it rendered at the BOTTOM of the form
  where users miss it. Moved to `before form/header` (same xpath
  pattern as the Account Hold banner) — now it's the first thing
  visible above the SO header.
- Was still showing "Shipped — awaiting invoice" after the invoice
  was posted because `_compute_workflow_stage` only advanced to
  `complete` when shipped + ALL paid; an unpaid posted invoice left
  the SO stuck on `shipped`. Added an `invoicing` branch: shipped +
  has_posted_invoice → invoicing. Banner invisible-list now also
  includes `invoicing` and `paid`, so the banner only shows for
  in-progress steps.

**2. Chatter messages rendering raw HTML tags as text**
Odoo 19 escapes any string passed to `message_post(body=...)`
unless wrapped in `markupsafe.Markup`. We had ~10 places posting
HTML (`<a href>`, `<b>`, `<br/>`, `<code>`, `<pre>`) that all
showed up as `&lt;a href=...&gt;` literal text in the chatter.

Wrapped each one with `Markup(_(...))` so the tags render. Files
touched:

- fusion_plating_bridge_mrp/models/sale_order.py
  (auto-MO failure code block, "Draft MO created" link,
   "Job assigned to <b>" message)
- fusion_plating_bridge_mrp/models/mrp_production.py
  ("Recipe steps" pre/br block on each WO)
- fusion_plating_bridge_mrp/models/fp_proficiency.py
  (operator promotion announcement)
- fusion_plating_configurator/models/fp_quote_configurator.py
  (SO link, 3D model attached, drawing attached, save to catalog)
- fusion_plating_configurator/models/fp_part_catalog.py
  (3D/drawing change tracking + propagation to linked quotes)
- fusion_plating_portal/models/fp_quote_request.py
  (RFQ → SO link)
- fusion_plating_quality/models/fp_quality_hold.py
  (hold status change)
- fusion_plating_shopfloor/controllers/manager_controller.py
  (worker / tank / manager-takeover assignments)

Verified on entech: SO S00038 stage now reads `invoicing` (banner
hidden), and a freshly posted message shows `<a href>` and `<b>`
as actual link + bold instead of escaped text.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 08:36:00 -04:00

99 lines
3.5 KiB
Python

# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
{
'name': 'Fusion Plating — Quality (QMS)',
'version': '19.0.1.1.0',
'category': 'Manufacturing/Plating',
'summary': 'Native QMS for plating shops: NCR, CAPA, calibration, AVL, FAIR, '
'internal audits, customer specs, document control. CE + EE compatible.',
'description': """
Fusion Plating — Quality (QMS)
==============================
Part of the Fusion Plating product family by Nexa Systems Inc.
A complete, native Quality Management System layer for the Fusion Plating
core. Built to satisfy the paperwork side of running a plating / metal
finishing shop without forcing customers onto Odoo Enterprise or paid
add-ons.
This module is intentionally Community Edition compatible. It does NOT
depend on `quality`, `quality_control`, `documents`, or `sign`. Everything
is built natively on `mail.thread`, `mail.activity.mixin`, and standard
Odoo records.
Records included
----------------
* Non-Conformance Reports (NCR) — containment, disposition, MRB workflow
* Corrective & Preventive Actions (CAPA) — root cause, action plan,
effectiveness verification, NCR linkage
* Calibration Equipment register + individual calibration events with
pass / limited / fail and impact assessment
* Approved Vendor List (AVL) — supplier approval state, expiry,
scorecard rating
* Customer Specification library — industry, customer, and internal
specs (e.g. AMS 2404, ASTM B733, MIL-C-26074)
* Internal Audits — internal, customer, certification, supplier scope
* First Article Inspection Reports (FAIR) — per part / revision / customer
* Document Control — procedures, work instructions, forms, standards,
manuals with revision tracking and trained-user lists
Integration
-----------
* Reuses the core res.groups.privilege ACLs from fusion_plating
(operator, supervisor, manager, admin) — no new groups to manage
* Linked to facilities, baths, and process types from core
* Chatter on every record for full audit trail
* Sequence-numbered references for NCR, CAPA, FAIR, audits
Theme aware
-----------
SCSS uses Bootstrap CSS variables and color-mix() so cards, badges, and
overdue indicators render correctly in both light and dark mode without
any media-query overrides.
Copyright (c) 2026 Nexa Systems Inc. All rights reserved.
""",
'author': 'Nexa Systems Inc.',
'website': 'https://www.nexasystems.ca',
'maintainer': 'Nexa Systems Inc.',
'support': 'support@nexasystems.ca',
'license': 'OPL-1',
'price': 0.00,
'currency': 'CAD',
'depends': [
'fusion_plating',
'mail',
],
'data': [
'security/fp_quality_security.xml',
'security/ir.model.access.csv',
'data/fp_sequence_data.xml',
'data/fp_quality_hold_sequence_data.xml',
'views/fp_quality_hold_views.xml',
'views/fp_ncr_views.xml',
'views/fp_capa_views.xml',
'views/fp_calibration_views.xml',
'views/fp_avl_views.xml',
'views/fp_customer_spec_views.xml',
'views/fp_audit_views.xml',
'views/fp_fair_views.xml',
'views/fp_doc_control_views.xml',
'views/fp_menu.xml',
],
'demo': [
'data/fp_demo_quality_data.xml',
],
'assets': {
'web.assets_backend': [
'fusion_plating_quality/static/src/scss/fusion_plating_quality.scss',
],
},
'installable': True,
'application': False,
'auto_install': False,
}