refactor: Simplify pivot view cell formatting by removing variation-specific xpath and generalizing value xpath.

This commit is contained in:
Suherdy Yacob 2026-02-03 17:04:03 +07:00
parent f2ac13c446
commit a3b744c2b2

View File

@ -2,11 +2,7 @@
<templates xml:space="preserve"> <templates xml:space="preserve">
<!-- Patch Pivot View Cells --> <!-- Patch Pivot View Cells -->
<t t-inherit="web.PivotRenderer" t-inherit-mode="extension"> <t t-inherit="web.PivotRenderer" t-inherit-mode="extension">
<xpath expr="//div[hasclass('o_variation')]" position="attributes"> <xpath expr="//div[hasclass('o_value')]" position="attributes">
<attribute name="t-esc"></attribute>
<attribute name="t-out">getFormattedVariation(cell)</attribute>
</xpath>
<xpath expr="//div[hasclass('o_value') and @t-else='1']" position="attributes">
<attribute name="t-esc"></attribute> <attribute name="t-esc"></attribute>
<attribute name="t-out">getFormattedValue(cell)</attribute> <attribute name="t-out">getFormattedValue(cell)</attribute>
</xpath> </xpath>