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 /addons/web/static/tests/helpers/test_utils_create.js | |
| 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 'addons/web/static/tests/helpers/test_utils_create.js')
| -rw-r--r-- | addons/web/static/tests/helpers/test_utils_create.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/tests/helpers/test_utils_create.js b/addons/web/static/tests/helpers/test_utils_create.js index 801120bf64b..341ace4fba8 100644 --- a/addons/web/static/tests/helpers/test_utils_create.js +++ b/addons/web/static/tests/helpers/test_utils_create.js @@ -282,7 +282,7 @@ odoo.define('web.test_utils_create', function (require) { async function createModel(params) { const widget = new Widget(); - const model = new params.Model(widget); + const model = new params.Model(widget, params); await testUtilsMock.addMockEnvironment(widget, params); |
