User reported "multiple unwanted vertical lines in the boxes" on the portrait BoL. Pixel analysis confirmed it: previous design had 3 separate `<div class="sig-box">` each with its own 1px border, with a 4-8px gap between adjacent boxes — visually those adjacent borders read as a doubled / "duplicate" line between cells. Fix: replace 3-box layout with a single `<table class="bordered sig-table">` containing 3 td cells. With border-collapse: collapse, adjacent cells share their border — so the row now shows 4 vertical lines (1 outer left + 2 internal dividers + 1 outer right) instead of 6 close-together border lines. - Dropped `.sig-box` class entirely (no per-box border anymore) - Added `.sig-table` + `.sig-cell` with explicit 1px borders so the layout works without depending on `.bordered` class inheritance - Applied to both portrait + landscape variants - Landscape sig-row was still using the OLD Bootstrap row+col-4 layout (never got replaced earlier) — also migrated to the new table layout Verified: page count unchanged (portrait 1, landscape 1), all labels and content present, structure clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
26 lines
935 B
Python
26 lines
935 B
Python
env = env # noqa
|
|
import re
|
|
rep = env.ref('fusion_plating_reports.action_report_fp_bol_portrait')
|
|
dlv = env['fusion.plating.delivery'].search([], order='id desc', limit=1)
|
|
html, _ = rep.with_context(force_report_rendering=True
|
|
)._render_qweb_html(rep.report_name, [dlv.id])
|
|
out = html.decode() if isinstance(html, bytes) else str(html)
|
|
|
|
# Pull the sig-table block + a bit before
|
|
m = re.search(r'(<div class="fp-keep-together".*?</div>)\s*</div>\s*</div>\s*</t>',
|
|
out, re.S)
|
|
if m:
|
|
print('=== fp-keep-together block ===')
|
|
print(m.group(1)[:3000])
|
|
else:
|
|
# Fallback — just find the sig-table
|
|
m2 = re.search(r'(<table class="sig-table".*?</table>)', out, re.S)
|
|
if m2:
|
|
print('=== sig-table block ===')
|
|
print(m2.group(1))
|
|
|
|
# Also dump the relevant CSS rules
|
|
print('\n=== relevant css ===')
|
|
for rule in re.findall(r'\.fp-report\s+\.(?:sig-|fp-keep)[^{]*\{[^}]*\}', out):
|
|
print(rule)
|