[IMP] developer/views: add and remove tags for position=attributes

The tags`add`, `remove` and `separator` are not included in the
documentation.

closes odoo/documentation#1741

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
poma-odoo 2022-03-25 15:41:59 +00:00 committed by Antoine Vandevenne (anv)
parent fa70e54d1a
commit 4eb09d95f2

View File

@ -297,6 +297,10 @@ how the matched node should be altered:
* if the ``attribute`` element has no body, the attribute named after * if the ``attribute`` element has no body, the attribute named after
its ``name`` is removed from the matched node. If no such attribute its ``name`` is removed from the matched node. If no such attribute
exists, an error is raised exists, an error is raised
* if the ``attribute`` element has an ``add`` attribute, a ``remove`` attribute, or both, the
value of the matched node's attribute named after ``name`` is recomputed to include the
value(s) of ``add`` (separated by ``separator``) and delete the value(s) of ``remove``
(separated by ``separator``). If ``separator`` is not provided, ``,`` is used instead.
.. code-block:: xml .. code-block:: xml
@ -305,6 +309,7 @@ how the matched node should be altered:
<attribute name="attrs"> <attribute name="attrs">
{'invisible': [('sale_ok', '=', False)], 'readonly': [('editable', '=', False)]} {'invisible': [('sale_ok', '=', False)], 'readonly': [('editable', '=', False)]}
</attribute> </attribute>
<attribute name="class" add="mt-1 mb-1" remove="mt-2 mb-2" separator=" "/>
</field> </field>
``move`` ``move``