summaryrefslogtreecommitdiff
path: root/addons/auth_ldap/models/__init__.py
diff options
context:
space:
mode:
authorMoisés López <moylop260@vauxoo.com>2016-08-16 01:31:06 +0000
committerOlivier Dony <odo@openerp.com>2016-09-02 13:25:27 +0200
commitdc18056fd01848c51a8dfe83f22bcc268aaefea4 (patch)
tree8da82b14831949f11aa6ccf4522d41c6daf7e801 /addons/auth_ldap/models/__init__.py
parentd41ed40c70faa9b30144c070a06fe2f07f15084b (diff)
[IMP] tools: support known "falsy" string values for XML boolean fields
Historically, developers had to use the `eval` attribute to set a False value for boolean fields in XML data files: <field name="active" eval="False"/> This is a source of errors for beginners, who tend to provide a string value directly, as for char/text fields. Unfortunately string values always evaluated to `True` booleans: <field name="active">False</field> <!-- active == true! --> This patch adds detection of some well-known falsy strings (case-insensitive): `0`, `false`, `off`, as similarly supported for the `noupdate` and `forcecreate` attributes of XML data records. Closes #13152
Diffstat (limited to 'addons/auth_ldap/models/__init__.py')
0 files changed, 0 insertions, 0 deletions