changes
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
Part of the Fusion Plating product family.
|
||||
|
||||
Adds a leading "Part #" column to the customer portal's Sales Order
|
||||
products table. Reads sale.order.line.x_fc_part_catalog_id.part_number
|
||||
(defined in fusion_plating_configurator). The existing second column
|
||||
keeps line.name — the customer-facing description.
|
||||
|
||||
Layout after this inherit:
|
||||
| Part # | Description | Quantity | Unit Price | [Disc] | [Taxes] | Amount |
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<template id="sale_order_portal_content_fp_part_column"
|
||||
inherit_id="sale.sale_order_portal_content">
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Header: Part # before "Products" -->
|
||||
<!-- ============================================================ -->
|
||||
<xpath expr="//th[@id='product_name_header']" position="before">
|
||||
<th class="text-start" id="product_part_header">Part #</th>
|
||||
</xpath>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Product rows: Part # cell before the description cell. -->
|
||||
<!-- Reads from x_fc_part_catalog_id; service / freight / display -->
|
||||
<!-- lines with no part catalog show an empty cell. -->
|
||||
<!-- ============================================================ -->
|
||||
<xpath expr="//td[@name='td_product_name']" position="before">
|
||||
<td name="td_product_part" t-att-class="padding_class">
|
||||
<span t-if="'x_fc_part_catalog_id' in line._fields and line.x_fc_part_catalog_id"
|
||||
t-out="line.x_fc_part_catalog_id.part_number"/>
|
||||
</td>
|
||||
</xpath>
|
||||
|
||||
<!-- Combo header rows: empty Part # cell (the part lives on the
|
||||
child lines, not the combo header). -->
|
||||
<xpath expr="//td[@name='td_combo_name']" position="before">
|
||||
<td name="td_combo_part" t-att-class="padding_class"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Collapsed section group rows: empty Part # cell. -->
|
||||
<xpath expr="//td[@name='td_section_group_name']" position="before">
|
||||
<td name="td_section_group_part"/>
|
||||
</xpath>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Section / subsection rows: extend the name-cell colspan by -->
|
||||
<!-- one so the new Part # column is absorbed into the section -->
|
||||
<!-- title band (sections span every column before the section -->
|
||||
<!-- total cell). The "not show_section_total" branch already -->
|
||||
<!-- uses 99 so no change needed there. -->
|
||||
<!-- ============================================================ -->
|
||||
<xpath expr="//t[@t-set='section_name_colspan'][1]" position="attributes">
|
||||
<attribute name="t-value">4 + (1 if display_discount else 0) + (1 if display_taxes else 0)</attribute>
|
||||
</xpath>
|
||||
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user