its descendants will be displayed in the main tree. The value is ignored
for flat lists.
-create
- set to 'false' to hide the link which allows to create a new
- record. This works if the Tree view is the main view on screen
- and also if it is displayed inside a form, for a one2many
- relation. This works also for Form views.
-
-delete
- set to 'false' to hide the link which allows to remove a
- record. This works also on Form views.
-
Grouping Elements
+++++++++++++++++
If you want to specify the views to use, you can add a *context* attribute, and
specify a view id for each type of view supported, exactly like the action's
-*view_id* attribute, except that the provided view id must always be
-fully-qualified with the module name, even if it belongs to the same module:
+*view_id* attribute:
.. code-block:: xml
<field name="order_line" colspan="4" nolabel="1"
- context="{'form_view_ref': 'module.view_id',
- 'tree_view_ref': 'module.view_id'}"/>
-
-.. note::
-
- You *have to* put the module name in the view_id, because this
- is evaluated when the view is displayed, and not when the XML file
- is parsed, so the module name information is not available. Failing
- to do so will result in the default view being selected (see
- below).
+ context="{'form_view_ref' : 'module.view_id', 'tree_view_ref' : 'model.view_id'}"/>
If you don't specify the views, OpenERP will choose one in this order :