fix: group Odoo products by template — show variant count instead of duplicates
Search endpoint now queries product.template instead of product.product, so a product with 20 variants shows as 1 row with a "20 variants" badge instead of 20 duplicate rows. Category name shown in sub-text. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -368,10 +368,18 @@
|
||||
<div class="woo-split-item"
|
||||
t-att-class="state.selectedOdooId === op.id ? 'selected' : ''"
|
||||
t-on-click="() => this.selectOdoo(op.id)">
|
||||
<div class="woo-split-item-name"><t t-esc="op.name"/></div>
|
||||
<div class="woo-split-item-name">
|
||||
<t t-esc="op.name"/>
|
||||
<t t-if="op.has_variants">
|
||||
<span class="woo-badge woo-badge-unmapped ms-2">
|
||||
<t t-esc="op.variant_count"/> variants
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<div class="woo-split-item-sub">
|
||||
<t t-if="op.default_code">SKU: <t t-esc="op.default_code"/> · </t>
|
||||
$<t t-esc="op.list_price.toFixed(2)"/>
|
||||
<t t-esc="this.formatPrice(op.list_price)"/>
|
||||
<t t-if="op.categ_name"> · <t t-esc="op.categ_name"/></t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user