feat(reports): customer_line_header QWeb macro + version bump (Sub 2 Task 17)
This commit is contained in:
@@ -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