diff options
| author | Victor Feyens <vfe@odoo.com> | 2019-04-23 09:24:35 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-25 15:25:00 +0000 |
| commit | 3917aa5fa2200e551e6de8b10c234b0499bde05f (patch) | |
| tree | 44b2a7c34e5fc6c0a4d961b91cdcf3435a5e5cf9 /doc | |
| parent | 74a5b93fc3a794ea0c32550de6edfe816aefab78 (diff) | |
[IMP] doc: views column_invisible info
X-original-commit: 82a90aa23c3d64b2d2e0cfa9d545b34fb33ec337
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/reference/views.rst | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/reference/views.rst b/doc/reference/views.rst index 660527380c8..8dadae4cac2 100644 --- a/doc/reference/views.rst +++ b/doc/reference/views.rst @@ -341,9 +341,21 @@ Possible children elements of the list view are: the list, we let the browser automatically adapt the column's widths according to their content, and this attribute is thus ignored. - .. note:: if the list view is ``editable``, any field attribute from the - :ref:`form view <reference/views/form>` is also valid and will - be used when setting up the inline form view + .. note:: + + if the list view is ``editable``, any field attribute from the + :ref:`form view <reference/views/form>` is also valid and will + be used when setting up the inline form view. + + .. note:: + + In case of list sub-views (One2many/Many2many display in a form view), + The attribute ``column_invisible`` can be useful to hide a column + depending on the parent object. + + .. code-block:: xml + + <field name="product_is_late" attrs="{'column_invisible': [('parent.has_late_products', '=', False)]}"/> .. note:: When a list view is grouped, numeric fields are aggregated and displayed for each group. Also, if there are too many records in |
