fix(plating): single bilingual CoC — remove the separate French print action
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 - <name>"). - 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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.',
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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': [
|
||||
|
||||
@@ -139,13 +139,10 @@
|
||||
<field name="sequence" eval="15"/>
|
||||
</record>
|
||||
|
||||
<!-- fp.certificate: English-first by default -->
|
||||
<!-- fp.certificate: single bilingual cert (French action removed 2026-05-28) -->
|
||||
<record id="fusion_plating_reports.action_report_coc_en" model="ir.actions.report">
|
||||
<field name="sequence" eval="10"/>
|
||||
</record>
|
||||
<record id="fusion_plating_reports.action_report_coc_fr" model="ir.actions.report">
|
||||
<field name="sequence" eval="15"/>
|
||||
</record>
|
||||
|
||||
<!-- portal job CoC -->
|
||||
<record id="fusion_plating_reports.action_report_coc_portrait" model="ir.actions.report">
|
||||
|
||||
@@ -121,34 +121,19 @@
|
||||
</record>
|
||||
|
||||
<!-- ============================================================= -->
|
||||
<!-- Formal Certificate of Conformance — English -->
|
||||
<!-- Compact portrait paperformat (margin_top=8) — same as the SO -->
|
||||
<!-- confirmation. The CoC now renders its own header (coc_header) -->
|
||||
<!-- via fp_external_layout_clean, so it needs the top of the page, -->
|
||||
<!-- not Odoo's ~40mm default header reservation. -->
|
||||
<!-- Certificate of Conformance — single bilingual cert. -->
|
||||
<!-- The body renders English + the French translation together, so -->
|
||||
<!-- the separate French print action was removed 2026-05-28 (orphan -->
|
||||
<!-- DB row + report_coc_fr template unlinked on entech). Compact -->
|
||||
<!-- portrait paperformat (margin_top=8) so coc_header sits at top. -->
|
||||
<!-- ============================================================= -->
|
||||
<record id="action_report_coc_en" model="ir.actions.report">
|
||||
<field name="name">Certificate of Conformance (English)</field>
|
||||
<field name="name">Certificate of Conformance</field>
|
||||
<field name="model">fp.certificate</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_plating_reports.report_coc_en</field>
|
||||
<field name="report_file">fusion_plating_reports.report_coc_en</field>
|
||||
<field name="print_report_name">'CoC EN - %s' % object.name</field>
|
||||
<field name="binding_model_id" ref="fusion_plating_certificates.model_fp_certificate"/>
|
||||
<field name="binding_type">report</field>
|
||||
<field name="paperformat_id" ref="paperformat_fp_a4_portrait"/>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================= -->
|
||||
<!-- Formal Certificate of Conformance — French -->
|
||||
<!-- ============================================================= -->
|
||||
<record id="action_report_coc_fr" model="ir.actions.report">
|
||||
<field name="name">Certificat de Conformité (Français)</field>
|
||||
<field name="model">fp.certificate</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_plating_reports.report_coc_fr</field>
|
||||
<field name="report_file">fusion_plating_reports.report_coc_fr</field>
|
||||
<field name="print_report_name">'CoC FR - %s' % object.name</field>
|
||||
<field name="print_report_name">'CoC - %s' % object.name</field>
|
||||
<field name="binding_model_id" ref="fusion_plating_certificates.model_fp_certificate"/>
|
||||
<field name="binding_type">report</field>
|
||||
<field name="paperformat_id" ref="paperformat_fp_a4_portrait"/>
|
||||
|
||||
@@ -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 @@
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- French CoC -->
|
||||
<!-- ================================================================== -->
|
||||
<template id="report_coc_fr">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-set="company" t-value="(doc.sale_order_id.company_id if doc.sale_order_id else False) or (doc.production_id.company_id if doc.production_id else False) or env.company"/>
|
||||
<!-- Custom SO-style header (see report_coc_en). -->
|
||||
<t t-call="fusion_plating_reports.fp_external_layout_clean">
|
||||
<t t-set="LANG" t-value="'fr'"/>
|
||||
<t t-call="fusion_plating_reports.coc_header"/>
|
||||
<div class="page">
|
||||
<!-- Sub 12c — router picks chronological vs classic body -->
|
||||
<t t-call="fusion_plating_reports.coc_body_router"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
<!-- French CoC template removed 2026-05-28 — the single bilingual
|
||||
report_coc_en renders English + French together. -->
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- Legacy portrait (bound to fusion.plating.portal.job) -->
|
||||
|
||||
Reference in New Issue
Block a user