summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2016-11-08 10:51:51 +0100
committerGéry Debongnie <ged@odoo.com>2016-11-08 15:21:37 +0100
commit78dfb019422ea734f2bd527a3503baffa8a35d44 (patch)
treeb3eedf633dab1b24276fb1087de53a9510720470 /addons/web/static/src/xml/base.xml
parent7eb8ed276992cf3ce693a02414f6558ee553128e (diff)
[IMP] web: disable selected fields in pivot dropdown
In the pivot view, when the user select a new field to drill down, the previous dropdown menu displayed all the groupable fields as valid choice. This commit disables all the fields that have already been selected. It means that they will be greyed out, and inactive in the UI.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml8
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index b732944f052..f23d862a100 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -582,7 +582,7 @@
<ul class="dropdown-menu o_pivot_field_menu" role="menu">
<t t-foreach="fields" t-as="field">
<t t-if="(field[1].type === 'date') || (field[1].type === 'datetime')">
- <li class="o_inline_dropdown" t-att-data-field="field[0]">
+ <li t-att-data-field="field[0]" t-attf-class="o_inline_dropdown#{field[2] ? ' disabled' : ''}">
<a href="#" class="o_pivot_field_selection">
<t t-esc="field[1].string"/>
</a>
@@ -595,8 +595,10 @@
</ul>
</li>
</t>
- <t t-if="(field[1].type !== 'date') &amp;&amp; (field[1].type !== 'datetime')">
- <li t-att-data-field="field[0]"><a href="#"><t t-esc="field[1].string"/></a></li>
+ <t t-else="">
+ <li t-att-data-field="field[0]" t-att-class="(field[2] ? 'disabled' : '')">
+ <a href="#"><t t-esc="field[1].string"/></a>
+ </li>
</t>
</t>
</ul>