diff options
| author | Jérémy Hennecart <jeh@odoo.com> | 2020-06-19 07:06:31 +0000 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2020-06-22 13:04:01 +0000 |
| commit | c7964657ecbbad278cec73cf231d7eef55b44347 (patch) | |
| tree | be77532a80cbed1283c2062cb2dc1159aa0fbdd4 /doc/reference/views.rst | |
| parent | 96fcefb6f1fe3fb5a5f197e2635e6d71d9a1d9dd (diff) | |
[IMP] web: add support of "sample" attribute in views
With this commit, it is now possible to display sample (fake)
data in empty views, in the hope of easing user onboarding.
This can be enabled (in list and kanban views) with attribute
sample="1" on the arch root element. In this case, if there is
no data to display, sample data will be generated based on
heuristics (depending on field types and names). This can be
used in addition to the no content helper.
Task 2232801
X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Jérémy Hennecart <jeh@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Diffstat (limited to 'doc/reference/views.rst')
| -rw-r--r-- | doc/reference/views.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/reference/views.rst b/doc/reference/views.rst index 79bd92b5a73..97d96fb7062 100644 --- a/doc/reference/views.rst +++ b/doc/reference/views.rst @@ -121,6 +121,18 @@ an impact on all view types. ``info``, ``warning``, ``danger`` and ``secondary`` displays. The list view supports ``bf``, ``it``, ``success``, ``info``, ``warning``, ``danger``, ``muted`` and ``primary`` displays. +* ``sample`` (``kanban`` & ``list`` & ``gantt``) + + Populate the view with a set of sample records if none are found for the current model. + This attribute is false by default. + + These fake records will have heuristics for certain field names/models. For example, + a field 'display_name' on the model 'res.users' will be populated with sample people names + while an 'email' field will be in the form 'firstname.lastname@sample.demo'. + + The user will not be able to interact with these data and they will be discarded as soon as + an action is performed (record created, column added, etc.) + * ``banner_route`` a route address to be fetched and prepended to the view. |
