feat(plating): Sub 5 — order-line fields (serial, job#, thickness, revision)
Four new fields on every sale.order.line, propagated through to MO, Delivery, and Invoice for end-to-end traceability: - fp.serial registry (new model in configurator) with smart-button traceability to Sale Order, MO, Delivery, Invoice, Part. M2O on SO line; optional; user types a customer serial or clicks Generate Serial for a sequence-backed one. Reverse O2M links split across configurator (invoice) / bridge_mrp (MO) / logistics (delivery) so module load order is respected. - x_fc_job_number on SO line, auto-sequenced FP-JOB-NNNNN on SO confirm. Editable — shops can override for customer/legacy schemes. - fp.coating.thickness (new child of fp.coating.config) with per- config discrete thickness options; x_fc_thickness_id on SO line domain-filtered to the line's coating. Auto-clears when coating changes. - x_fc_revision_snapshot Char on SO line, frozen from x_fc_part_catalog_id.revision at save. Protects historical SOs from later catalog edits. Secondary "Revision" picker on the tree view lets users switch between prior revisions of the same part number; the Part M2O still surfaces only is_latest_revision rows. Reports (CoC, packing slip, invoice, BoL) pick up all four via the Sub 2 customer_line_header macro — one macro edit, four reports. Smoke on entech: 11 assertions pass including revision snapshot, generate-serial button, typed-serial create-on-fly, coating→thickness domain reset, SO confirm auto job#, and MO traceability carry. Module version bumps: fusion_plating_configurator → 19.0.12.0.0 fusion_plating_bridge_mrp → 19.0.11.0.0 fusion_plating_logistics → 19.0.2.0.0 (+depends configurator) fusion_plating_reports → 19.0.5.1.0 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.5.0.0',
|
||||
'version': '19.0.5.1.0',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'PDF reports for Fusion Plating: quote, SO, WO, packing, BoL, CoC, invoice, receipt, quality + compliance.',
|
||||
'depends': [
|
||||
|
||||
@@ -24,12 +24,35 @@
|
||||
<t t-if="line.x_fc_part_catalog_id">
|
||||
<strong>
|
||||
<span t-esc="line.x_fc_part_catalog_id.part_number"/>
|
||||
<t t-if="line.x_fc_part_catalog_id.revision">
|
||||
<span> (Rev <span t-esc="line.x_fc_part_catalog_id.revision"/>)</span>
|
||||
<!-- Sub 5 — prefer the revision snapshot captured on the line
|
||||
at save time; fall back to the catalog's current revision
|
||||
if no snapshot was frozen (old lines from before Sub 5). -->
|
||||
<t t-set="_rev" t-value="(
|
||||
line.x_fc_revision_snapshot
|
||||
if 'x_fc_revision_snapshot' in line._fields
|
||||
and line.x_fc_revision_snapshot
|
||||
else line.x_fc_part_catalog_id.revision)"/>
|
||||
<t t-if="_rev">
|
||||
<span> (Rev <span t-esc="_rev"/>)</span>
|
||||
</t>
|
||||
</strong>
|
||||
<br/>
|
||||
<span t-esc="line.name"/>
|
||||
<!-- Sub 5 — print serial / job# / thickness under the line
|
||||
description when populated. Each on its own row so blank
|
||||
fields disappear cleanly. -->
|
||||
<t t-if="'x_fc_serial_id' in line._fields and line.x_fc_serial_id">
|
||||
<br/>
|
||||
<small>Serial: <span t-esc="line.x_fc_serial_id.name"/></small>
|
||||
</t>
|
||||
<t t-if="'x_fc_job_number' in line._fields and line.x_fc_job_number">
|
||||
<br/>
|
||||
<small>Job #: <span t-esc="line.x_fc_job_number"/></small>
|
||||
</t>
|
||||
<t t-if="'x_fc_thickness_id' in line._fields and line.x_fc_thickness_id">
|
||||
<br/>
|
||||
<small>Thickness: <span t-esc="line.x_fc_thickness_id.display_name"/></small>
|
||||
</t>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<!-- Fee / freight / non-part line: standard Odoo rendering -->
|
||||
|
||||
Reference in New Issue
Block a user