[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#5181
X-original-commit: a7743d513b
Signed-off-by: Levi Siuzdak (sile) <sile@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
parent
f15044a45e
commit
729d5bbe22
@ -2330,11 +2330,14 @@ Possible children elements of the search view are:
|
||||
|
||||
<filter domain="[('state', '=', 'draft')]"/>
|
||||
<separator/>
|
||||
<filter domain="[('delay', '<', 15)]"/>
|
||||
<filter domain="[('delay', '<', 15)]"/>
|
||||
|
||||
if both filters are selected, will select the records whose ``state``
|
||||
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``
|
||||
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', '<', 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.
|
||||
|
||||
The following should be added to the previously created search view:
|
||||
|
Loading…
Reference in New Issue
Block a user