feat(sticker): bigger text, bigger high-def QR, drop "WO #" prefix

WO# cell now just renders the number (e.g. "WO-30019") since the
"WO" is already baked into the doc index format — the redundant
prefix was eating cell width without adding information.

Size bumps:
- WO# 44pt -> 62pt (text is shorter so the cell can carry the
  extra weight)
- Body field text 22pt -> 26pt, line-height 1.1 -> 1.0 so the
  bigger font still fits 7 rows in the body band
- Notes label 22pt -> 26pt, content 16pt -> 19pt
- Logo max-height 120 -> 135px
- Muted rev tag 16pt -> 18pt

QR upgrades (both "bigger" and "high def" as asked):
- Source resolution 300x300 -> 600x600. At 300dpi print across
  a 28.8mm wrapper, effective output is ~515ppi vs the prior
  ~256ppi. Scanners on the floor will read it cleanly even at
  steeper angles / scuffed labels.
- Wrapper 290 -> 340px (+17%). Image 390 -> 447px, offset -50
  -> -53px (recomputed quiet-zone crop: 600 * 0.12 = 72px
  margin -> 456px effective QR data -> 340 * 600/456 = 447
  scaled image -> (447-340)/2 = 53px offset).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-12 23:38:05 -04:00
parent 80d1cc5639
commit 8aa817b1a0
2 changed files with 25 additions and 22 deletions

View File

@@ -3,7 +3,7 @@
# License OPL-1 (Odoo Proprietary License v1.0) # License OPL-1 (Odoo Proprietary License v1.0)
{ {
'name': 'Fusion Plating — Reports', 'name': 'Fusion Plating — Reports',
'version': '19.0.10.5.0', 'version': '19.0.10.6.0',
'category': 'Manufacturing/Plating', 'category': 'Manufacturing/Plating',
'summary': 'PDF reports for Fusion Plating: quote, SO, WO, packing, BoL, CoC, invoice, receipt, quality + compliance.', 'summary': 'PDF reports for Fusion Plating: quote, SO, WO, packing, BoL, CoC, invoice, receipt, quality + compliance.',
'depends': [ 'depends': [

View File

@@ -83,9 +83,11 @@
or (_part and _part.name) or (_part and _part.name)
or '-'"/> or '-'"/>
<!-- Inline the QR as base64 data URI so wkhtmltopdf doesn't need <!-- Inline the QR as base64 data URI so wkhtmltopdf doesn't need
to fetch /report/barcode/ over the network during rendering. --> to fetch /report/barcode/ over the network during rendering.
600x600 source at 300dpi print = ~515ppi effective — high-def
scan reliability for the 4x6" label. -->
<t t-set="_qr_src" t-value="env['ir.actions.report'].barcode_data_uri( <t t-set="_qr_src" t-value="env['ir.actions.report'].barcode_data_uri(
'QR', _scan_url, width=300, height=300)"/> 'QR', _scan_url, width=600, height=600)"/>
<style> <style>
@page { margin: 0; size: 152mm 102mm; } @page { margin: 0; size: 152mm 102mm; }
@@ -136,36 +138,37 @@
td.fp-sticker-head-logo { border-right: 2px solid #000; padding: 0 6px; } td.fp-sticker-head-logo { border-right: 2px solid #000; padding: 0 6px; }
td.fp-sticker-head-wo { border-right: 2px solid #000; } td.fp-sticker-head-wo { border-right: 2px solid #000; }
.fp-sticker-logo { .fp-sticker-logo {
max-height: 120px; max-height: 135px;
max-width: 95%; max-width: 95%;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }
.fp-sticker-wo { .fp-sticker-wo {
font-size: 44pt; font-size: 62pt;
font-weight: 900; font-weight: 900;
letter-spacing: 0.1mm; letter-spacing: 0.1mm;
line-height: 1; line-height: 1;
white-space: nowrap; white-space: nowrap;
margin: 0; margin: 0;
} }
/* QR wrapper crops the white quiet-zone around the QR pattern. /* QR wrapper crops the ~12% quiet-zone the barcode generator
Odoo's barcode generator pads ~12% of quiet-zone on each side; adds around the QR pattern. We render the image larger than
we render the image larger and offset it so the wrapper clips the wrapper and offset so the wrapper clips that border out.
the border out. ---- */ Wrapper 340px = ~28.8mm at 300dpi → fits the 30% header
band with breathing room. ---- */
.fp-sticker-qr-wrap { .fp-sticker-qr-wrap {
width: 290px; width: 340px;
height: 290px; height: 340px;
display: inline-block; display: inline-block;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.fp-sticker-qr { .fp-sticker-qr {
width: 390px; width: 447px;
height: 390px; height: 447px;
position: absolute; position: absolute;
top: -50px; top: -53px;
left: -50px; left: -53px;
margin: 0; margin: 0;
display: block; display: block;
} }
@@ -202,8 +205,8 @@
table.fp-sticker-body td { table.fp-sticker-body td {
vertical-align: middle; vertical-align: middle;
padding: 0 12px; padding: 0 12px;
font-size: 22pt; font-size: 26pt;
line-height: 1.1; line-height: 1.0;
} }
td.fp-sticker-label { td.fp-sticker-label {
font-weight: 700; font-weight: 700;
@@ -217,16 +220,16 @@
white-space: nowrap; white-space: nowrap;
} }
.fp-sticker-strong { font-weight: 700; } .fp-sticker-strong { font-weight: 700; }
.fp-sticker-muted { color: #555; font-size: 16pt; } .fp-sticker-muted { color: #555; font-size: 18pt; }
/* Notes column on the right side of the body. */ /* Notes column on the right side of the body. */
.fp-notes-label { .fp-notes-label {
font-weight: 700; font-weight: 700;
font-size: 22pt; font-size: 26pt;
margin: 0 0 6px 0; margin: 0 0 6px 0;
} }
.fp-notes-content { .fp-notes-content {
font-size: 16pt; font-size: 19pt;
line-height: 1.3; line-height: 1.25;
white-space: pre-line; white-space: pre-line;
word-wrap: break-word; word-wrap: break-word;
overflow: hidden; overflow: hidden;
@@ -257,7 +260,7 @@
</td> </td>
<td class="fp-sticker-head-wo"> <td class="fp-sticker-head-wo">
<div class="fp-sticker-wo"> <div class="fp-sticker-wo">
WO #<span t-esc="_order_id"/> <span t-esc="_order_id"/>
</div> </div>
</td> </td>
<td> <td>