fix: handle null/zero prices in mapping UI template
toFixed() was failing on null values. Now uses explicit null/undefined checks so $0.00 prices display correctly instead of showing dashes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -153,11 +153,11 @@
|
||||
<td><span class="woo-code"><t t-esc="p.woo_sku"/></span></td>
|
||||
<td><t t-esc="p.odoo_product_name"/></td>
|
||||
<td class="text-end">
|
||||
<t t-if="p.woo_price">$<t t-esc="p.woo_price.toFixed(2)"/></t>
|
||||
<t t-if="p.woo_price !== null and p.woo_price !== undefined and p.woo_price !== false">$<t t-esc="Number(p.woo_price).toFixed(2)"/></t>
|
||||
<t t-else=""><span class="woo-text-muted">—</span></t>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<t t-if="p.odoo_price">$<t t-esc="p.odoo_price.toFixed(2)"/></t>
|
||||
<t t-if="p.odoo_price !== null and p.odoo_price !== undefined and p.odoo_price !== false">$<t t-esc="Number(p.odoo_price).toFixed(2)"/></t>
|
||||
<t t-else=""><span class="woo-text-muted">—</span></t>
|
||||
</td>
|
||||
<td><t t-esc="p.instance_name"/></td>
|
||||
|
||||
Reference in New Issue
Block a user