summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorAdrien Dieudonne <adr@odoo.com>2017-05-11 14:32:02 +0200
committerAdrien Dieudonne <adr@odoo.com>2017-05-22 14:55:47 +0200
commit12bf5bb92665f81e9df8e918b130e86356f61052 (patch)
treed2a9f5d118e8193ecb7ad5d88fb058e250a60284 /addons/web/static/src/xml/base.xml
parent4b8c34be15f355958bbdb64c440018bdbe72ad3c (diff)
[FIX] web: FieldMany2ManyCheckBoxes: label not clickable
Before this commit, it was only possible to click on input to change the value of the many2many_checkboxes widget. For better consistency, we must allow to click on labels.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index ac463d12be1..043dee026c5 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1180,11 +1180,12 @@
<t t-name="FieldMany2ManyCheckBoxes">
<div>
<div t-foreach="widget.m2mValues" t-as="m2m_value">
+ <t t-set="id_for_label" t-value="'o_many2many_checkbox_' + _.uniqueId()"/>
<div class="o_checkbox">
- <input type="checkbox" t-att-data-record-id="JSON.stringify(m2m_value[0])"/>
+ <input type="checkbox" t-att-id="id_for_label" t-att-data-record-id="JSON.stringify(m2m_value[0])"/>
<span/>
</div>
- <label class="o_form_label"><t t-esc="m2m_value[1]"/></label>
+ <label t-att-for="id_for_label" class="o_form_label"><t t-esc="m2m_value[1]"/></label>
</div>
</div>
</t>