diff options
| author | Mathieu Duckerts-Antoine <dam@odoo.com> | 2020-05-08 08:57:44 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2020-06-12 13:34:04 +0000 |
| commit | 3306a0f41492ee51e93ce9cedcd42296e09df6a0 (patch) | |
| tree | 6864dfb7530b63e451b43c791127c9bdfbeade36 /addons/web/static/src/xml | |
| parent | e5585c078ef936c3533ba9361c05188fb5e3ab1d (diff) | |
[IMP] *: limit in search panel
This commit introduces a new attribute 'limit' for search panel fields
that allows to avoid performance issues. That integer attribute (with
default 200) allows to fix a maximal number of values to display for the
fields. When the number of field values to display reaches the limit,
no values will be displayed. Instead, a warning message will be shown
in the corresponding search panel section.
Note it is possible to have no limit using limit="0" on a field.
This commit reintroduces in a better way the principle brought by the
fix 8d57153b34c04952a85f6642951cb2697016da84.
Task ID: 2154749
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/kanban.xml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/addons/web/static/src/xml/kanban.xml b/addons/web/static/src/xml/kanban.xml index 114f0ccd876..f4657d4b3a3 100644 --- a/addons/web/static/src/xml/kanban.xml +++ b/addons/web/static/src/xml/kanban.xml @@ -222,7 +222,10 @@ <t t-call="SearchPanel.SectionHeader"> <t t-set="section" t-value="category"/> </t> - <ul class="list-group d-block o_search_panel_field" t-att-data-field-name="category.fieldName"> + <div t-if="category.errorMsg" class="alert alert-warning"> + <span><t t-esc="category.errorMsg"/></span> + </div> + <ul t-else="" class="list-group d-block o_search_panel_field" t-att-data-field-name="category.fieldName"> <li class="o_search_panel_category_value border-0 list-group-item" t-att-data-category-id="category.id"> <header t-att-class="'list-group-item-action' + (!category.activeValueId ? ' active' : '')"> <label class="o_search_panel_label mb0"> @@ -267,7 +270,10 @@ <t t-call="SearchPanel.SectionHeader"> <t t-set="section" t-value="filter"/> </t> - <ul class="list-group d-block o_search_panel_field" t-att-data-field-name="filter.fieldName"> + <div t-if="filter.errorMsg" class="alert alert-warning"> + <span><t t-esc="filter.errorMsg"/></span> + </div> + <ul t-else="" class="list-group d-block o_search_panel_field" t-att-data-field-name="filter.fieldName"> <t t-if="filter.groups" t-call="SearchPanel.FilterGroups"> <t t-set="groups" t-value="filter.groups"/> </t> |
