-
- Downloads
[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:Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by:
Julien Mougenot <jum@odoo.com>
Showing
- addons/web/models/models.py 291 additions, 142 deletionsaddons/web/models/models.py
- addons/web/static/src/js/views/abstract_controller.js 3 additions, 1 deletionaddons/web/static/src/js/views/abstract_controller.js
- addons/web/static/src/js/views/search_panel.js 17 additions, 22 deletionsaddons/web/static/src/js/views/search_panel.js
- addons/web/static/src/xml/kanban.xml 2 additions, 9 deletionsaddons/web/static/src/xml/kanban.xml
- addons/web/static/tests/helpers/mock_server.js 283 additions, 128 deletionsaddons/web/static/tests/helpers/mock_server.js
- addons/web/static/tests/views/search_panel_tests.js 1268 additions, 25 deletionsaddons/web/static/tests/views/search_panel_tests.js
- doc/reference/views.rst 12 additions, 1 deletiondoc/reference/views.rst
- odoo/addons/base/models/ir_module.py 4 additions, 4 deletionsodoo/addons/base/models/ir_module.py
- odoo/addons/base/rng/common.rng 2 additions, 0 deletionsodoo/addons/base/rng/common.rng
- odoo/addons/test_search_panel/tests/test_search_panel_select_multi_range.py 325 additions, 100 deletions...earch_panel/tests/test_search_panel_select_multi_range.py
- odoo/addons/test_search_panel/tests/test_search_panel_select_range.py 307 additions, 44 deletions...test_search_panel/tests/test_search_panel_select_range.py
Loading
Please register or sign in to comment