fix(numbering): WO Detail report strips WO- prefix for compact display

short_wo now handles both naming schemes: new WO-NNNNN[-NN] (strips
WO-) and legacy WH/JOB/NNNNN (last slash segment). Customer-facing
Work Order column shows '30000-02' instead of 'WO-30000-02'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-12 14:34:09 -04:00
parent be109c9c79
commit fdbbd2852a
2 changed files with 10 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
# License OPL-1 (Odoo Proprietary License v1.0)
{
'name': 'Fusion Plating — Native Jobs',
'version': '19.0.8.22.6',
'version': '19.0.8.22.7',
'category': 'Manufacturing/Plating',
'summary': 'Native plating job model — replaces mrp.production / mrp.workorder bridge.',
'author': 'Nexa Systems Inc.',

View File

@@ -78,7 +78,15 @@
("WH/JOB/01373" → "01373"). Keeps the column / cert
reference compact; full job.name is still used
internally and on the print_report_name. -->
<t t-set="short_wo" t-value="(job.name or '').split('/')[-1]"/>
<!-- WO display: strip the model prefix so the Work
Order column shows "30000" or "30000-02" instead
of "WO-30000". Handles both naming schemes:
- new "WO-NNNNN[-NN]" (post 2026-05-12 numbering)
- legacy "WH/JOB/NNNNN" (pre-2026-05-12 jobs) -->
<t t-set="short_wo" t-value="(
job.name and job.name.startswith('WO-') and job.name[3:]
or (job.name or '').split('/')[-1]
)"/>
<!-- Photo evidence — collect every captured-input value
that has an attachment, in step / time order. We