[IMP] developer: add notes on entity references & fix illegal XML
Using `<` inside XML elements will result in a parsing error, an entity reference should be used instead: `<`. closes odoo/documentation#5159 Signed-off-by: Levi Siuzdak (sile) <sile@odoo.com> Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
parent
471d68e186
commit
a7743d513b
@ -2185,11 +2185,14 @@ Possible children elements of the search view are:
|
|||||||
|
|
||||||
<filter domain="[('state', '=', 'draft')]"/>
|
<filter domain="[('state', '=', 'draft')]"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<filter domain="[('delay', '<', 15)]"/>
|
<filter domain="[('delay', '<', 15)]"/>
|
||||||
|
|
||||||
if both filters are selected, will select the records whose ``state``
|
if both filters are selected, will select the records whose ``state``
|
||||||
is ``draft`` **and** ``delay`` is below 15.
|
is ``draft`` **and** ``delay`` is below 15.
|
||||||
|
|
||||||
|
.. note:: XML does not allow ``<`` to be used within XML elements,
|
||||||
|
an entity reference (``<``) should be used instead.
|
||||||
|
|
||||||
``separator``
|
``separator``
|
||||||
can be used to separates groups of filters in simple search views
|
can be used to separates groups of filters in simple search views
|
||||||
|
|
||||||
|
@ -218,6 +218,16 @@ services *OR* have a unit price which is *NOT* between 1000 and 2000'::
|
|||||||
('unit_price', '>=', 1000),
|
('unit_price', '>=', 1000),
|
||||||
('unit_price', '<', 2000)]
|
('unit_price', '<', 2000)]
|
||||||
|
|
||||||
|
.. note:: XML does not allow ``<`` and ``&`` to be used inside XML
|
||||||
|
elements. To avoid parsing errors, entity references should be used:
|
||||||
|
``<`` for ``<`` and ``&`` for ``&``. Other entity references
|
||||||
|
(``>``, ``'`` & ``"``) are optional.
|
||||||
|
|
||||||
|
.. example::
|
||||||
|
.. code-block:: xml
|
||||||
|
|
||||||
|
<filter name="negative" domain="[('test_val', '<', 0)]"/>
|
||||||
|
|
||||||
.. exercise:: Add filter and Group By.
|
.. exercise:: Add filter and Group By.
|
||||||
|
|
||||||
The following should be added to the previously created search view:
|
The following should be added to the previously created search view:
|
||||||
|
Loading…
Reference in New Issue
Block a user