fix(reports): keep BoL signature row intact across page breaks
Landscape BoL was splitting the signature row down the middle — boxes half on page 1, half on page 2. Two complementary fixes: 1. **Per-element rule**: added `page-break-inside: avoid` + `break-inside: avoid` to `.sig-box` (both portrait + landscape styles) so an individual signature box can never split across pages. 2. **Wrapper rule**: introduced `.fp-keep-together` utility + wrapped the BoL's certification statement + signature row in it, so the whole "sign here" block moves to the next page as one unit if it doesn't fit. Also applied `page-break-inside: avoid` to `table tr` so cargo lines don't split mid-row either. Lives in shared `report_base_styles.xml` so any FP template that opts into `.fp-keep-together` benefits automatically. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
{
|
||||
'name': 'Fusion Plating — Reports',
|
||||
'version': '19.0.4.2.0',
|
||||
'version': '19.0.4.3.0',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'PDF reports for Fusion Plating: quote, SO, WO, packing, BoL, CoC, invoice, receipt, quality + compliance.',
|
||||
'depends': [
|
||||
|
||||
@@ -46,10 +46,13 @@
|
||||
.fp-report .status-ok { color: #2e7d32; font-weight: bold; }
|
||||
.fp-report .status-warning { color: #f57f17; font-weight: bold; }
|
||||
.fp-report .status-fail { color: #c62828; font-weight: bold; }
|
||||
.fp-report .sig-box { border: 1px solid #000; padding: 14px 12px 8px 12px; min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; }
|
||||
.fp-report .sig-box { border: 1px solid #000; padding: 14px 12px 8px 12px; min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; page-break-inside: avoid; break-inside: avoid; }
|
||||
.fp-report .sig-line { border-bottom: 1px solid #000; min-height: 60px; }
|
||||
.fp-report .small-muted { font-size: 8pt; color: #666; }
|
||||
.fp-report .fp-cell-mid { vertical-align: middle !important; }
|
||||
.fp-report .fp-keep-together { page-break-inside: avoid; break-inside: avoid; }
|
||||
.fp-report .fp-keep-together .row, .fp-report .fp-keep-together .col-4 { page-break-inside: avoid; break-inside: avoid; }
|
||||
.fp-report table tr { page-break-inside: avoid; break-inside: avoid; }
|
||||
</style>
|
||||
</template>
|
||||
|
||||
@@ -83,10 +86,13 @@
|
||||
.fp-landscape .status-ok { color: #2e7d32; font-weight: bold; }
|
||||
.fp-landscape .status-warning { color: #f57f17; font-weight: bold; }
|
||||
.fp-landscape .status-fail { color: #c62828; font-weight: bold; }
|
||||
.fp-landscape .sig-box { border: 1px solid #000; padding: 14px 12px 8px 12px; min-height: 130px; display: flex; flex-direction: column; justify-content: flex-end; }
|
||||
.fp-landscape .sig-box { border: 1px solid #000; padding: 14px 12px 8px 12px; min-height: 130px; display: flex; flex-direction: column; justify-content: flex-end; page-break-inside: avoid; break-inside: avoid; }
|
||||
.fp-landscape .sig-line { border-bottom: 1px solid #000; min-height: 70px; }
|
||||
.fp-landscape .small-muted { font-size: 9pt; color: #666; }
|
||||
.fp-landscape .fp-cell-mid { vertical-align: middle !important; }
|
||||
.fp-landscape .fp-keep-together { page-break-inside: avoid; break-inside: avoid; }
|
||||
.fp-landscape .fp-keep-together .row, .fp-landscape .fp-keep-together .col-4 { page-break-inside: avoid; break-inside: avoid; }
|
||||
.fp-landscape table tr { page-break-inside: avoid; break-inside: avoid; }
|
||||
</style>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
@@ -174,31 +174,33 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- Certification statement -->
|
||||
<div class="highlight-box" style="margin-top: 10px;">
|
||||
This is to certify that the above-named materials are properly classified,
|
||||
packaged, marked, and labelled, and are in proper condition for transportation
|
||||
according to the applicable regulations of the Department of Transportation.
|
||||
</div>
|
||||
<!-- Cert statement + signatures held together so the
|
||||
BoL doesn't split the signature row across pages. -->
|
||||
<div class="fp-keep-together">
|
||||
<div class="highlight-box" style="margin-top: 10px;">
|
||||
This is to certify that the above-named materials are properly classified,
|
||||
packaged, marked, and labelled, and are in proper condition for transportation
|
||||
according to the applicable regulations of the Department of Transportation.
|
||||
</div>
|
||||
|
||||
<!-- Sign off -->
|
||||
<div class="row" style="margin-top: 20px;">
|
||||
<div class="col-4">
|
||||
<div class="sig-box">
|
||||
<div class="sig-line"/>
|
||||
<div class="small-muted">Shipper (Signature / Date)</div>
|
||||
<div class="row" style="margin-top: 20px;">
|
||||
<div class="col-4">
|
||||
<div class="sig-box">
|
||||
<div class="sig-line"/>
|
||||
<div class="small-muted">Shipper (Signature / Date)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="sig-box">
|
||||
<div class="sig-line"/>
|
||||
<div class="small-muted">Carrier / Driver (Signature / Date)</div>
|
||||
<div class="col-4">
|
||||
<div class="sig-box">
|
||||
<div class="sig-line"/>
|
||||
<div class="small-muted">Carrier / Driver (Signature / Date)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="sig-box">
|
||||
<div class="sig-line"/>
|
||||
<div class="small-muted">Consignee (Signature / Date)</div>
|
||||
<div class="col-4">
|
||||
<div class="sig-box">
|
||||
<div class="sig-line"/>
|
||||
<div class="small-muted">Consignee (Signature / Date)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user