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

closes odoo/documentation#5779

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 488470514f
commit 0662d1d7ce

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);
#. Use the view in an arch.
#. Declare the :ref:`view <reference/views/structure>` in the arch.
.. 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>
...