Skip to content
Snippets Groups Projects
Unverified Commit dc18056f authored by Moises Lopez's avatar Moises Lopez Committed by Olivier Dony
Browse files

[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
parent d41ed40c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment