From b94b08e5794a13a637ca1564ada417cee28d4697 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Wed, 17 Apr 2019 14:48:26 +0000 Subject: [DOC] ir.actions.act_window.view --- doc/reference/actions.rst | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'doc/reference') diff --git a/doc/reference/actions.rst b/doc/reference/actions.rst index 4396d3adff1..b205d9116db 100644 --- a/doc/reference/actions.rst +++ b/doc/reference/actions.rst @@ -21,16 +21,16 @@ e.g. button methods. All actions share two mandatory attributes: A client can get actions in 4 forms: -``False`` - if any action dialog is currently open, close it -A string - if a :ref:`client action ` matches, interpret as - a client action's tag, otherwise treat as a number -A number - read the corresponding action record from the database, may be a database - identifier or an :term:`external id` -A dictionary - treat as a client action descriptor and execute +* ``False`` + if any action dialog is currently open, close it +* A string + if a :ref:`client action ` matches, interpret as + a client action's tag, otherwise treat as a number +* A number + read the corresponding action record from the database, may be a database + identifier or an :term:`external id` +* A dictionary + treat as a client action descriptor and execute .. _reference/actions/window: @@ -102,12 +102,27 @@ dialog:: In-database window actions have a few different fields which should be ignored by clients, mostly to use in composing the ``views`` list: -``view_mode`` - comma-separated list of view types as a string. All of these types will be +``view_mode`` (default= ``tree,form`` ) + comma-separated list of view types as a string (/!\\ No spaces /!\\). All of these types will be present in the generated ``views`` list (with at least a ``False`` view_id) ``view_ids`` M2M\ [#notquitem2m]_ to view objects, defines the initial content of ``views`` + + .. note:: Act_window views can also be defined cleanly through ``ir.actions.act_window.view``. + + If you plan to allow multiple views for your model, prefer using + ir.actions.act_window.view instead of the action ``view_ids`` + + .. code-block:: xml + + + + tree + + + + ``view_id`` specific view added to the ``views`` list in case its type is part of the ``view_mode`` list and not already filled by one of the views in -- cgit v1.2.3