Skip to content
Snippets Groups Projects
Commit e5585c07 authored by Mathieu Duckerts-Antoine's avatar Mathieu Duckerts-Antoine Committed by Julien Mougenot
Browse files

[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 8d57153b 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: default avatarMathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: default avatarJulien Mougenot <jum@odoo.com>
parent f5f0ca84
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment