From 66f7f6c6441b0c71d78d927d38ad424911a9d886 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Fri, 17 Apr 2026 01:50:35 -0400 Subject: [PATCH] =?UTF-8?q?fix(coc):=20single-page=20layout=20=E2=80=94=20?= =?UTF-8?q?custom=20paperformat=20+=20strip=20Odoo=20wrappers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CoC was rendering on 2 pages with ~35mm of dead whitespace at the top. Three compounding causes: 1. Default Odoo paperformat reserves header_spacing=35mm (where the standard letterhead would sit when using web.external_layout). Our CoC has its own full-bleed header so that reservation was pure empty space. → New paperformat_fp_coc with header_spacing=0, 8mm all-around margins, attached to both report_coc_en and report_coc_fr actions. 2. The `
` and nested `
` wrappers inherited Odoo's CSS which applies `page-break-after: always` on `.page` and additional padding on `.article`. → Dropped both wrappers — template now renders body directly inside html_container. 3. Inline style block didn't override Odoo's body/main padding. → Aggressive !important reset at the top of the style block on html, body, main, .article, .page, and the hidden header/footer classes. Also shrunk all paddings by ~30% and bumped base font to 9pt to guarantee single-page fit. Verified: PDF is now 1 page, content starts at the top (title flush with top margin), accreditation logos + customer logo + signature all render correctly within the single page. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../report/report_actions.xml | 20 ++++++ .../report/report_coc.xml | 70 ++++++++++--------- 2 files changed, 58 insertions(+), 32 deletions(-) diff --git a/fusion_plating/fusion_plating_reports/report/report_actions.xml b/fusion_plating/fusion_plating_reports/report/report_actions.xml index 0f0f679b..6d5a46d0 100644 --- a/fusion_plating/fusion_plating_reports/report/report_actions.xml +++ b/fusion_plating/fusion_plating_reports/report/report_actions.xml @@ -23,6 +23,24 @@ 90 + + + + + + Fusion Plating CoC + + A4 + Portrait + 8 + 8 + 8 + 8 + + 0 + 90 + + @@ -62,6 +80,7 @@ 'CoC EN - %s' % object.name report + @@ -76,6 +95,7 @@ 'CoC FR - %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 d6ac01eb..b05f057a 100644 --- a/fusion_plating/fusion_plating_reports/report/report_coc.xml +++ b/fusion_plating/fusion_plating_reports/report/report_coc.xml @@ -33,29 +33,42 @@
@@ -318,19 +331,16 @@ - - + + + @@ -343,11 +353,7 @@ -
-
- -
-
+