From 49a0a953e5b8c96f8026524bd441b2c8b28032cd Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Thu, 28 May 2026 23:33:00 -0400 Subject: [PATCH] =?UTF-8?q?fix(plating):=20single=20bilingual=20CoC=20?= =?UTF-8?q?=E2=80=94=20remove=20the=20separate=20French=20print=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CoC body now renders English + the French translation together, so the separate "Certificat de Conformité (Français)" print option was redundant. - Removed the action_report_coc_fr report action and the now-dead report_coc_fr template; renamed action_report_coc_en to "Certificate of Conformance" (print filename "CoC - "). - fp_notification_template: dropped the per-partner-language EN/FR branch — CoC email attachments always render the single bilingual action_report_coc_en. - fp_hide_default_reports: dropped the FR sequence record. - Refreshed the report_coc.xml design note. - Bump reports 19.0.11.32.0, notifications 19.0.7.1.0. Deployed on entech (-u removed the orphan FR action + template). Verified the cert Print menu now lists only "Certificate of Conformance" and it renders clean. The dead action_report_coc_fr ref in the uninstalled fusion_plating_bridge_mrp is left as-is (module not loaded). Co-Authored-By: Claude Opus 4.7 --- .../__manifest__.py | 2 +- .../models/fp_notification_template.py | 10 ++--- .../fusion_plating_reports/__manifest__.py | 2 +- .../data/fp_hide_default_reports.xml | 5 +-- .../report/report_actions.xml | 29 ++++---------- .../report/report_coc.xml | 38 +++++-------------- 6 files changed, 24 insertions(+), 62 deletions(-) diff --git a/fusion_plating/fusion_plating_notifications/__manifest__.py b/fusion_plating/fusion_plating_notifications/__manifest__.py index d2aeed3e..30ba60e2 100644 --- a/fusion_plating/fusion_plating_notifications/__manifest__.py +++ b/fusion_plating/fusion_plating_notifications/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Fusion Plating — Notifications', - 'version': '19.0.7.0.0', + 'version': '19.0.7.1.0', 'category': 'Manufacturing/Plating', 'summary': 'Auto-email notifications at workflow milestones with configurable templates, PDF attachments, and audit log.', 'author': 'Nexa Systems Inc.', diff --git a/fusion_plating/fusion_plating_notifications/models/fp_notification_template.py b/fusion_plating/fusion_plating_notifications/models/fp_notification_template.py index 3a782f19..127fb7c5 100644 --- a/fusion_plating/fusion_plating_notifications/models/fp_notification_template.py +++ b/fusion_plating/fusion_plating_notifications/models/fp_notification_template.py @@ -340,13 +340,11 @@ class FpNotificationTemplate(models.Model): ('certificate_type', '=', 'coc'), ], order='id desc', limit=1) if cert: - lang = (cert.partner_id.lang or '').lower() - cert_xmlid = ( - 'fusion_plating_reports.action_report_coc_fr' - if lang.startswith('fr') - else 'fusion_plating_reports.action_report_coc_en' + # CoC is bilingual now — the single EN action renders + # both languages, so there's no per-lang branch. + att = _render_report( + 'fusion_plating_reports.action_report_coc_en', cert, ) - att = _render_report(cert_xmlid, cert) else: att = _render_report( 'fusion_plating_reports.action_report_coc', portal_job, diff --git a/fusion_plating/fusion_plating_reports/__manifest__.py b/fusion_plating/fusion_plating_reports/__manifest__.py index f631362a..28522b42 100644 --- a/fusion_plating/fusion_plating_reports/__manifest__.py +++ b/fusion_plating/fusion_plating_reports/__manifest__.py @@ -3,7 +3,7 @@ # License OPL-1 (Odoo Proprietary License v1.0) { 'name': 'Fusion Plating — Reports', - 'version': '19.0.11.31.0', + 'version': '19.0.11.32.0', 'category': 'Manufacturing/Plating', 'summary': 'PDF reports for Fusion Plating: quote, SO, WO, packing, BoL, CoC, invoice, receipt, quality + compliance.', 'depends': [ diff --git a/fusion_plating/fusion_plating_reports/data/fp_hide_default_reports.xml b/fusion_plating/fusion_plating_reports/data/fp_hide_default_reports.xml index 330b4fd6..f0337b53 100644 --- a/fusion_plating/fusion_plating_reports/data/fp_hide_default_reports.xml +++ b/fusion_plating/fusion_plating_reports/data/fp_hide_default_reports.xml @@ -139,13 +139,10 @@ - + - - - diff --git a/fusion_plating/fusion_plating_reports/report/report_actions.xml b/fusion_plating/fusion_plating_reports/report/report_actions.xml index c764ef70..71419198 100644 --- a/fusion_plating/fusion_plating_reports/report/report_actions.xml +++ b/fusion_plating/fusion_plating_reports/report/report_actions.xml @@ -121,34 +121,19 @@ - - - - - + + + + + - Certificate of Conformance (English) + Certificate of Conformance fp.certificate qweb-pdf fusion_plating_reports.report_coc_en fusion_plating_reports.report_coc_en - 'CoC EN - %s' % object.name - - report - - - - - - - - Certificat de Conformité (Français) - fp.certificate - qweb-pdf - fusion_plating_reports.report_coc_fr - fusion_plating_reports.report_coc_fr - 'CoC FR - %s' % object.name + 'CoC - %s' % object.name report diff --git a/fusion_plating/fusion_plating_reports/report/report_coc.xml b/fusion_plating/fusion_plating_reports/report/report_coc.xml index cb991024..6af57ce5 100644 --- a/fusion_plating/fusion_plating_reports/report/report_coc.xml +++ b/fusion_plating/fusion_plating_reports/report/report_coc.xml @@ -5,17 +5,16 @@ Fusion Plating — Certificate of Conformance Design note: - The EN + FR CoCs wrap their body in web.external_layout. That gives - us Odoo's standard company-branded header (logo, name, address, - phone, email, tax id) and footer (page X/Y, printed-on) for free, - using whichever layout variant the company has chosen in - Settings → General → Document Layout. Our body just renders the - CoC-specific content: title, accreditation badges, customer block, - details table, signature, and certification statement. + Single bilingual CoC — English and the French translation render + together. The body wraps in fp_external_layout_clean + a custom + coc_header (logo + Nadcap + title/barcode, mirroring the Sale Order) + instead of web.external_layout; coc_body_router picks the classic vs + chronological body. Variants: - - report_coc_en English formal cert (primary) - - report_coc_fr French mirror + - report_coc_en The single bilingual cert, bound to the + "Certificate of Conformance" print action. The + former report_coc_fr was removed 2026-05-28. - report_coc, report_coc_portrait Legacy portal-job-bound variants (unchanged) --> @@ -605,25 +604,8 @@ - - - - +