summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/pivot.xml
diff options
context:
space:
mode:
authorNisha patel <nit@odoo.com>2020-01-30 06:26:18 +0000
committerYannick Tivisse <yti@odoo.com>2020-02-27 13:16:32 +0000
commit4df7594d58f62ed76c3227413b2f335e83198c0b (patch)
tree4d94d3a1cb634fc9fb41bb34641fee40e43a804d /addons/web/static/src/xml/pivot.xml
parentf4bcf2c3f922d54bbea93cabedfe60e8c6b1c6c9 (diff)
[FIX] web: fix boolean fields display in pivot view
Since formatBoolean returns a jQuery object, boolean fields were displayed as [Object object] in pivot view. so fix the issue of checkbox in the pivot view by not calling fromatValue for boolean instead just set the checkbox element in in template itself and added test case for checkbox in pivot view. closes odoo/odoo#46445 Taskid: 2172258 Closes: #44299 X-original-commit: d7d0caf6f599f313687c958c5aff5764c0d23ffd Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src/xml/pivot.xml')
-rw-r--r--addons/web/static/src/xml/pivot.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/web/static/src/xml/pivot.xml b/addons/web/static/src/xml/pivot.xml
index bfc08e56bd1..0b16af71f0c 100644
--- a/addons/web/static/src/xml/pivot.xml
+++ b/addons/web/static/src/xml/pivot.xml
@@ -37,6 +37,12 @@
o_negative: cell.value &lt; 0,
o_null: cell.value === 0,
}" t-esc="_getFormattedVariation(cell)"/>
+ <div t-elif="props.fields and props.fields[cell.measure].type === 'boolean'" class="o_value">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" t-attf-id="checkbox_{{cell_index}}_{{row_index}}" disabled="disabled" t-att-checked="cell.value" class="custom-control-input"/>
+ <label t-attf-for="checkbox_{{cell_index}}_{{row_index}}" class="custom-control-label"/>
+ </div>
+ </div>
<div t-else="1" class="o_value" t-esc="_getFormattedValue(cell)"/>
</t>
</td>