[IMP] Views howtos: add details on how to use a view in arch

closes odoo/documentation#5780

X-original-commit: c1c04f90a8
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
This commit is contained in:
fdardenne 2023-09-08 11:32:39 +02:00
parent babd571b8b
commit b1ece27040

View File

@ -253,10 +253,16 @@ Creating a new view is an advanced topic. This guide highlight only the essentia
registry.category("views").add("beautifulView", beautifulView); registry.category("views").add("beautifulView", beautifulView);
#. Use the view in an arch. #. Declare the :ref:`view <reference/view_records/structure>` in the arch.
.. code-block:: xml .. code-block:: xml
... ...
<beautiful fieldFromTheArch="res.partner"/> <record id="my_beautiful_view" model="ir.ui.view">
<field name="name">my_view</field>
<field name="model">my_model</field>
<field name="arch" type="xml">
<beautiful fieldFromTheArch="res.partner"/>
</field>
</record>
... ...