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:
@@ -3,7 +3,7 @@
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
{
|
||||
'name': 'Fusion Plating — Reports',
|
||||
'version': '19.0.10.5.0',
|
||||
'version': '19.0.10.6.0',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'PDF reports for Fusion Plating: quote, SO, WO, packing, BoL, CoC, invoice, receipt, quality + compliance.',
|
||||
'depends': [
|
||||
|
||||
@@ -83,9 +83,11 @@
|
||||
or (_part and _part.name)
|
||||
or '-'"/>
|
||||
<!-- 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(
|
||||
'QR', _scan_url, width=300, height=300)"/>
|
||||
'QR', _scan_url, width=600, height=600)"/>
|
||||
|
||||
<style>
|
||||
@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-wo { border-right: 2px solid #000; }
|
||||
.fp-sticker-logo {
|
||||
max-height: 120px;
|
||||
max-height: 135px;
|
||||
max-width: 95%;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.fp-sticker-wo {
|
||||
font-size: 44pt;
|
||||
font-size: 62pt;
|
||||
font-weight: 900;
|
||||
letter-spacing: 0.1mm;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
}
|
||||
/* QR wrapper crops the white quiet-zone around the QR pattern.
|
||||
Odoo's barcode generator pads ~12% of quiet-zone on each side;
|
||||
we render the image larger and offset it so the wrapper clips
|
||||
the border out. ---- */
|
||||
/* QR wrapper crops the ~12% quiet-zone the barcode generator
|
||||
adds around the QR pattern. We render the image larger than
|
||||
the wrapper and offset so the wrapper clips that border out.
|
||||
Wrapper 340px = ~28.8mm at 300dpi → fits the 30% header
|
||||
band with breathing room. ---- */
|
||||
.fp-sticker-qr-wrap {
|
||||
width: 290px;
|
||||
height: 290px;
|
||||
width: 340px;
|
||||
height: 340px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.fp-sticker-qr {
|
||||
width: 390px;
|
||||
height: 390px;
|
||||
width: 447px;
|
||||
height: 447px;
|
||||
position: absolute;
|
||||
top: -50px;
|
||||
left: -50px;
|
||||
top: -53px;
|
||||
left: -53px;
|
||||
margin: 0;
|
||||
display: block;
|
||||
}
|
||||
@@ -202,8 +205,8 @@
|
||||
table.fp-sticker-body td {
|
||||
vertical-align: middle;
|
||||
padding: 0 12px;
|
||||
font-size: 22pt;
|
||||
line-height: 1.1;
|
||||
font-size: 26pt;
|
||||
line-height: 1.0;
|
||||
}
|
||||
td.fp-sticker-label {
|
||||
font-weight: 700;
|
||||
@@ -217,16 +220,16 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
.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. */
|
||||
.fp-notes-label {
|
||||
font-weight: 700;
|
||||
font-size: 22pt;
|
||||
font-size: 26pt;
|
||||
margin: 0 0 6px 0;
|
||||
}
|
||||
.fp-notes-content {
|
||||
font-size: 16pt;
|
||||
line-height: 1.3;
|
||||
font-size: 19pt;
|
||||
line-height: 1.25;
|
||||
white-space: pre-line;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
@@ -257,7 +260,7 @@
|
||||
</td>
|
||||
<td class="fp-sticker-head-wo">
|
||||
<div class="fp-sticker-wo">
|
||||
WO #<span t-esc="_order_id"/>
|
||||
<span t-esc="_order_id"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user