[FIX] form selection field: don't interpret value 0 as false in the template when the code doesn't do so

bzr revid: xmo@openerp.com-20121206135114-nuwc3wdc6zatbl3d
This commit is contained in:
Xavier Morel
2012-12-06 14:51:14 +01:00
parent 96408a36f0
commit 7ac99cbeaf
2 changed files with 8 additions and 8 deletions
+4 -1
View File
@@ -1054,7 +1054,10 @@
t-att-autofocus="widget.node.attrs.autofocus"
t-att-id="widget.id_for_label">
<t t-foreach="widget.values" t-as="option">
<option><t t-esc="widget.node.attrs.placeholder" t-if="option[0] == false and widget.node.attrs.placeholder"/><t t-esc="option[1]" t-if="option[0] != false"/></option>
<option>
<t t-esc="widget.node.attrs.placeholder" t-if="option[0] === false and widget.node.attrs.placeholder"/>
<t t-esc="option[1]" t-if="option[0] !== false"/>
</option>
</t>
</select>
</span>