feat(sticker): add Internal Job Sticker variant on fp.job Print menu
Mirror of the SO Internal variant for fp.job. Same body fields, same per-box loop; Notes column reads x_fc_internal_description from the first linked SO line (job.sale_order_line_ids[:1]). Operator on the shop floor sees ops-internal notes without those ever appearing on the customer-facing External sticker. Verified on fp.job 2635 with seeded internal_description: Notes column reads "INTERNAL JOB: handle with care, no rework on this batch" — confirms the Job Internal variant's override path mirrors the SO Internal variant's. 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)
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||||
{
|
{
|
||||||
'name': 'Fusion Plating — Native Jobs',
|
'name': 'Fusion Plating — Native Jobs',
|
||||||
'version': '19.0.8.24.0',
|
'version': '19.0.8.25.0',
|
||||||
'category': 'Manufacturing/Plating',
|
'category': 'Manufacturing/Plating',
|
||||||
'summary': 'Native plating job model — replaces mrp.production / mrp.workorder bridge.',
|
'summary': 'Native plating job model — replaces mrp.production / mrp.workorder bridge.',
|
||||||
'author': 'Nexa Systems Inc.',
|
'author': 'Nexa Systems Inc.',
|
||||||
|
|||||||
@@ -71,4 +71,48 @@
|
|||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- Internal Job sticker — same fields as External, but the Notes
|
||||||
|
column reads x_fc_internal_description from the first linked
|
||||||
|
SO line (Sub 5 thickness+serial grouping means same-x_fc lines
|
||||||
|
share a job, so first-line is representative). -->
|
||||||
|
<record id="action_report_fp_job_sticker_internal" model="ir.actions.report">
|
||||||
|
<field name="name">Internal Job Sticker</field>
|
||||||
|
<field name="model">fp.job</field>
|
||||||
|
<field name="report_type">qweb-pdf</field>
|
||||||
|
<field name="report_name">fusion_plating_jobs.report_fp_job_sticker_internal_template</field>
|
||||||
|
<field name="report_file">fusion_plating_jobs.report_fp_job_sticker_internal_template</field>
|
||||||
|
<field name="print_report_name">'Internal Job Sticker - %s' % (object.name or '').replace('/', '-')</field>
|
||||||
|
<field name="binding_model_id" ref="fusion_plating.model_fp_job"/>
|
||||||
|
<field name="binding_type">report</field>
|
||||||
|
<field name="paperformat_id" ref="paperformat_fp_job_sticker"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<template id="report_fp_job_sticker_internal_template">
|
||||||
|
<t t-call="web.html_container">
|
||||||
|
<t t-foreach="docs" t-as="job">
|
||||||
|
<t t-call="fusion_plating_reports.report_fp_wo_sticker_defaults"/>
|
||||||
|
<t t-set="_order_id" t-value="job.name"/>
|
||||||
|
<t t-set="_scan_id" t-value="job.id"/>
|
||||||
|
<t t-set="_scan_path" t-value="'/fp/job/'"/>
|
||||||
|
<t t-set="_mo" t-value="False"/>
|
||||||
|
<t t-set="_so" t-value="job.sale_order_id"/>
|
||||||
|
<t t-set="_line" t-value="job.sale_order_line_ids[:1]"/>
|
||||||
|
<t t-set="_part" t-value="('part_catalog_id' in job._fields and job.part_catalog_id) or False"/>
|
||||||
|
<t t-set="_coating" t-value="('coating_config_id' in job._fields and job.coating_config_id) or False"/>
|
||||||
|
<t t-set="_process" t-value="job.recipe_id or False"/>
|
||||||
|
<t t-set="_due" t-value="job.date_deadline or False"/>
|
||||||
|
<t t-set="_qty" t-value="job.qty"/>
|
||||||
|
<t t-set="_qty_total" t-value="job.qty"/>
|
||||||
|
<t t-set="_partner_name" t-value="job.partner_id.name"/>
|
||||||
|
<t t-set="_mo_ref" t-value="''"/>
|
||||||
|
<!-- Internal override: read x_fc_internal_description from
|
||||||
|
the first linked SO line. -->
|
||||||
|
<t t-set="_notes_content" t-value="(job.sale_order_line_ids[:1]
|
||||||
|
and 'x_fc_internal_description' in job.sale_order_line_ids[:1]._fields
|
||||||
|
and job.sale_order_line_ids[:1].x_fc_internal_description) or '-'"/>
|
||||||
|
<t t-call="fusion_plating_reports.report_fp_wo_sticker_inner"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
Reference in New Issue
Block a user