feat(reports): customer_line_header QWeb macro + version bump (Sub 2 Task 17)
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 — Reports',
|
'name': 'Fusion Plating — Reports',
|
||||||
'version': '19.0.4.9.0',
|
'version': '19.0.5.0.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': [
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
'report/report_discharge_sample.xml',
|
'report/report_discharge_sample.xml',
|
||||||
'report/report_wo_margin.xml',
|
'report/report_wo_margin.xml',
|
||||||
# Quote-to-cash reports (portrait + landscape)
|
# Quote-to-cash reports (portrait + landscape)
|
||||||
|
'report/customer_line_header.xml',
|
||||||
'report/report_fp_sale.xml',
|
'report/report_fp_sale.xml',
|
||||||
'report/report_fp_work_order.xml',
|
'report/report_fp_work_order.xml',
|
||||||
'report/report_fp_job_traveller.xml',
|
'report/report_fp_job_traveller.xml',
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2026 Nexa Systems Inc.
|
||||||
|
License OPL-1
|
||||||
|
|
||||||
|
Sub 2 — shared QWeb macro for customer-facing line rendering.
|
||||||
|
|
||||||
|
Called from report_fp_sale, report_fp_invoice, report_fp_packing_slip,
|
||||||
|
report_fp_bol. Prints the customer's part number + revision + the
|
||||||
|
line's customer-facing description (the `name` field, standard Odoo).
|
||||||
|
|
||||||
|
For non-part lines (rush fees, freight, expedite) where
|
||||||
|
x_fc_part_catalog_id is blank, falls back to Odoo's standard product
|
||||||
|
display — safe for fee/service lines that shouldn't look like parts.
|
||||||
|
|
||||||
|
Params expected in the calling context:
|
||||||
|
line - the sale.order.line / account.move.line / stock.picking line
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
<t t-call="fusion_plating_reports.customer_line_header"/>
|
||||||
|
-->
|
||||||
|
<odoo>
|
||||||
|
<template id="customer_line_header">
|
||||||
|
<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>
|
||||||
|
</t>
|
||||||
|
</strong>
|
||||||
|
<br/>
|
||||||
|
<span t-esc="line.name"/>
|
||||||
|
</t>
|
||||||
|
<t t-else="">
|
||||||
|
<!-- Fee / freight / non-part line: standard Odoo rendering -->
|
||||||
|
<strong t-esc="line.product_id.display_name or ''"/>
|
||||||
|
<t t-if="line.name and line.name != line.product_id.display_name">
|
||||||
|
<br/>
|
||||||
|
<span t-esc="line.name"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user