summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorMathieu Duckerts-Antoine <dam@odoo.com>2020-05-07 14:09:57 +0000
committerJulien Mougenot <jum@odoo.com>2020-06-12 13:34:04 +0000
commite5585c078ef936c3533ba9361c05188fb5e3ab1d (patch)
treee3f1b1ab1b7065d3cbf074d14f7895a894563aea /addons/web/static/src/xml
parentf5f0ca843d98bcbaf0fd8ad63a31a3cacf390168 (diff)
[IMP] *: expand and hierarchize in search panel
The commit introduces two new attributes for search panel fields: - hierarchize: boolean attribute (default True) available for many2one fields with select="one". It allows to choose whether to hierarchize the field values using the _parent_name (if set) on the field comodel. Note that a sanitization of the parent hierarchy takes place. Basically, it ensures that parent chains are completely in the domain (on comodel) accessible by the user. See _search_panel_sanitized_parent_hierarchy documentation for more information. - expand: boolean attribute (default False) available for many2one and many2many fields. If set to true, all field values are fetched and displayed in the search panel. If set to false, only the values that have at least one corresponding value in the field model (and in some domain) are fetched. An exception in the case of an hierarchized field (hierarchize=True and _parent_name set): more/less values can be displayed in order to have a good representation of the parent hierarchy. That means we complete and sanitize the set of initial field image values. Note that the fix 8d57153b34c04952a85f6642951cb2697016da84 bringing the notion of limit in search panel has been reverted in the present commit. An upcomming commit will reintroduce the limit principle in a better way. Task ID: 2154749 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/kanban.xml11
1 files changed, 2 insertions, 9 deletions
diff --git a/addons/web/static/src/xml/kanban.xml b/addons/web/static/src/xml/kanban.xml
index f8e6781f6c3..114f0ccd876 100644
--- a/addons/web/static/src/xml/kanban.xml
+++ b/addons/web/static/src/xml/kanban.xml
@@ -235,10 +235,6 @@
<t t-set="values" t-value="category.rootIds"/>
</t>
</ul>
- <div t-if="category.limitAttained" class="alert alert-warning">
- <span>For performance reasons, only 200 values were fetched. Some values might be missing.</span>
- <span t-if="category.parentField">The values have not been hierarchized.</span>
- </div>
</section>
</t>
<t t-name="SearchPanel.CategoryValues">
@@ -253,7 +249,7 @@
<span class="o_search_panel_label_title"><t t-esc="value.display_name"/></span>
</label>
<span t-if="category.enableCounters and value.__count > 0"
- class="text-muted ml-2 small"
+ class="o_search_panel_counter text-muted ml-2 small"
t-esc="value.__count"
/>
</header>
@@ -280,9 +276,6 @@
<t t-set="values" t-value="filter.values"/>
</t>
</ul>
- <div t-if="filter.limitAttained" class="alert alert-warning">
- <span>For performance reasons, only 200 values were fetched. Some values might be missing.</span>
- </div>
</section>
</t>
<t t-name="SearchPanel.FilterGroups">
@@ -327,7 +320,7 @@
<label t-att-for="inputId" class="o_search_panel_label custom-control-label" t-att-title="group &amp;&amp; group.tooltip">
<span class="o_search_panel_label_title" t-esc="value.display_name"/>
<span t-if="filter.enableCounters and value.__count > 0"
- class="text-muted ml-2 small"
+ class="o_search_panel_counter text-muted ml-2 small"
t-esc="value.__count"
/>
</label>