diff options
| author | Moisés López <moylop260@vauxoo.com> | 2016-08-16 01:31:06 +0000 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2016-09-02 13:25:27 +0200 |
| commit | dc18056fd01848c51a8dfe83f22bcc268aaefea4 (patch) | |
| tree | 8da82b14831949f11aa6ccf4522d41c6daf7e801 /addons/website/data/website_data.xml | |
| parent | d41ed40c70faa9b30144c070a06fe2f07f15084b (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/website/data/website_data.xml')
0 files changed, 0 insertions, 0 deletions
