Skip to content

Commit

Permalink
Enable 'Use Criteria' selection
Browse files Browse the repository at this point in the history
  • Loading branch information
NL66278 committed Sep 22, 2021
1 parent e594010 commit 713641f
Show file tree
Hide file tree
Showing 16 changed files with 316 additions and 50 deletions.
48 changes: 47 additions & 1 deletion web_advanced_search/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,37 @@ to a journal which has a user who is member of a certain group etc.
Note also the domain dialog offers an editable preview in debug mode:
.. image:: https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/debug_mode.png

In Selection operator
~~~~~~~~~~~~~~~~~~~~~

It is also possible when having selected a relational field to filter on, to
choose for the 'is in selection' operator. This will result in opening a list view for
the related model, where it is possible either to select some records, and then use the
'Select' butto, or to enter filters on the related model, and then click the
'Use Criteria' button.

Example: select the 'Created By' field to filter Invoices, and then 'is in selection'
as operator:

.. image:: https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/01-is-in-selection-operator.png

Then select some records and click on the select button:

.. image:: https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/02-select-button.png

Only invoices created by the selected users will be shown:

.. image:: https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/03-select-result.png

Another example would be to filter on the invoice partners:

.. image:: https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/04-use-criteria-button.png

Now only invoices for partners that are companies, and are in a country with 'Swit' in
the name will be shown:

.. image:: https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/05-use-criteria-result.png

Known issues / Roadmap
======================

Expand All @@ -77,10 +108,22 @@ Improvements to the search view in this addon:
Issues:

* Grouped totals can show incorrect values. See https://github.com/odoo/odoo/issues/47950
* DomainSelector Dialog cannot correctly show 'in selection' domains.

Changelog
=========

14.0.2.0.0 (2021-09-21)
~~~~~~~~~~~~~~~~~~~~~~~

* Restore the 'is in selection' operator.

The 'is in selection' operator offers a really convenient way to either pick a
selection of related records, or specify criteria / filters to define a domain for
the related records.

[NL66278]

11.0.1.0.2 (2018-10-31)
~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -92,7 +135,6 @@ Changelog

[simahawk]


11.0.1.0.1 (2018-09-18)
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -159,6 +201,10 @@ Contributors

* Raf Ven

* `Therp BV <https://therp.nl>`_:

* Ronald Portier

Maintainers
~~~~~~~~~~~

Expand Down
8 changes: 4 additions & 4 deletions web_advanced_search/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright 2015 Therp BV <http://therp.nl>
# Copyright 2015-2021 Therp BV <https://therp.nl>
# Copyright 2017 Tecnativa - Vicent Cubells
# Copyright 2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Advanced search",
"version": "14.0.1.0.1",
"author": "Therp BV, " "Tecnativa, " "Odoo Community Association (OCA)",
"version": "14.0.2.0.0",
"author": "Therp BV, Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Usability",
"summary": "Easier and more powerful searching tools",
Expand Down
12 changes: 11 additions & 1 deletion web_advanced_search/readme/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
14.0.2.0.0 (2021-09-21)
~~~~~~~~~~~~~~~~~~~~~~~

* Restore the 'is in selection' operator.

The 'is in selection' operator offers a really convenient way to either pick a
selection of related records, or specify criteria / filters to define a domain for
the related records.

[NL66278]

11.0.1.0.2 (2018-10-31)
~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -9,7 +20,6 @@

[simahawk]


11.0.1.0.1 (2018-09-18)
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions web_advanced_search/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ Improvements to the search view in this addon:
Issues:

* Grouped totals can show incorrect values. See https://github.com/odoo/odoo/issues/47950
* DomainSelector Dialog cannot correctly show 'in selection' domains.
31 changes: 31 additions & 0 deletions web_advanced_search/readme/USAGE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,34 @@ to a journal which has a user who is member of a certain group etc.

Note also the domain dialog offers an editable preview in debug mode:
.. image:: ../static/img/debug_mode.png

In Selection operator
~~~~~~~~~~~~~~~~~~~~~

It is also possible when having selected a relational field to filter on, to
choose for the 'is in selection' operator. This will result in opening a list view for
the related model, where it is possible either to select some records, and then use the
'Select' butto, or to enter filters on the related model, and then click the
'Use Criteria' button.

Example: select the 'Created By' field to filter Invoices, and then 'is in selection'
as operator:

.. image:: ../static/img/01-is-in-selection-operator.png

Then select some records and click on the select button:

.. image:: ../static/img/02-select-button.png

Only invoices created by the selected users will be shown:

.. image:: ../static/img/03-select-result.png

Another example would be to filter on the invoice partners:

.. image:: ../static/img/04-use-criteria-button.png

Now only invoices for partners that are companies, and are in a country with 'Swit' in
the name will be shown:

.. image:: ../static/img/05-use-criteria-result.png
88 changes: 64 additions & 24 deletions web_advanced_search/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,25 +372,29 @@ <h1 class="title">Advanced search</h1>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="id4">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id5">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#changelog" id="id6">Changelog</a><ul>
<li><a class="reference internal" href="#id1" id="id7">11.0.1.0.2 (2018-10-31)</a></li>
<li><a class="reference internal" href="#id2" id="id8">11.0.1.0.1 (2018-09-18)</a></li>
<li><a class="reference internal" href="#id3" id="id9">11.0.1.0.0 (2018-07-20)</a></li>
<li><a class="reference internal" href="#usage" id="id5">Usage</a><ul>
<li><a class="reference internal" href="#in-selection-operator" id="id6">In Selection operator</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="id10">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id11">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id12">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id13">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id14">Maintainers</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id7">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#changelog" id="id8">Changelog</a><ul>
<li><a class="reference internal" href="#id1" id="id9">14.0.2.0.0 (2021-09-21)</a></li>
<li><a class="reference internal" href="#id2" id="id10">11.0.1.0.2 (2018-10-31)</a></li>
<li><a class="reference internal" href="#id3" id="id11">11.0.1.0.1 (2018-09-18)</a></li>
<li><a class="reference internal" href="#id4" id="id12">11.0.1.0.0 (2018-07-20)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="id13">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id14">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id15">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id16">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id17">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id4">Usage</a></h1>
<h1><a class="toc-backref" href="#id5">Usage</a></h1>
<p>To use this module, you need to:</p>
<ul class="simple">
<li>Open <em>Filters</em> in a search view</li>
Expand All @@ -417,9 +421,29 @@ <h1><a class="toc-backref" href="#id4">Usage</a></h1>
<dd><img alt="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/debug_mode.png" class="first last" src="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/debug_mode.png" />
</dd>
</dl>
<div class="section" id="in-selection-operator">
<h2><a class="toc-backref" href="#id6">In Selection operator</a></h2>
<p>It is also possible when having selected a relational field to filter on, to
choose for the ‘is in selection’ operator. This will result in opening a list view for
the related model, where it is possible either to select some records, and then use the
‘Select’ butto, or to enter filters on the related model, and then click the
‘Use Criteria’ button.</p>
<p>Example: select the ‘Created By’ field to filter Invoices, and then ‘is in selection’
as operator:</p>
<img alt="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/01-is-in-selection-operator.png" src="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/01-is-in-selection-operator.png" />
<p>Then select some records and click on the select button:</p>
<img alt="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/02-select-button.png" src="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/02-select-button.png" />
<p>Only invoices created by the selected users will be shown:</p>
<img alt="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/03-select-result.png" src="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/03-select-result.png" />
<p>Another example would be to filter on the invoice partners:</p>
<img alt="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/04-use-criteria-button.png" src="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/04-use-criteria-button.png" />
<p>Now only invoices for partners that are companies, and are in a country with ‘Swit’ in
the name will be shown:</p>
<img alt="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/05-use-criteria-result.png" src="https://raw.githubusercontent.com/OCA/web/14.0/web_advanced_search/static/img/05-use-criteria-result.png" />
</div>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id5">Known issues / Roadmap</a></h1>
<h1><a class="toc-backref" href="#id7">Known issues / Roadmap</a></h1>
<p>Improvements to the <tt class="docutils literal">domain</tt> widget, not exclusively related to this addon:</p>
<ul class="simple">
<li>Use relational widgets when filtering a relational field</li>
Expand All @@ -434,12 +458,24 @@ <h1><a class="toc-backref" href="#id5">Known issues / Roadmap</a></h1>
<p>Issues:</p>
<ul class="simple">
<li>Grouped totals can show incorrect values. See <a class="reference external" href="https://github.com/odoo/odoo/issues/47950">https://github.com/odoo/odoo/issues/47950</a></li>
<li>DomainSelector Dialog cannot correctly show ‘in selection’ domains.</li>
</ul>
</div>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#id6">Changelog</a></h1>
<h1><a class="toc-backref" href="#id8">Changelog</a></h1>
<div class="section" id="id1">
<h2><a class="toc-backref" href="#id7">11.0.1.0.2 (2018-10-31)</a></h2>
<h2><a class="toc-backref" href="#id9">14.0.2.0.0 (2021-09-21)</a></h2>
<ul>
<li><p class="first">Restore the ‘is in selection’ operator.</p>
<p>The ‘is in selection’ operator offers a really convenient way to either pick a
selection of related records, or specify criteria / filters to define a domain for
the related records.</p>
<p>[NL66278]</p>
</li>
</ul>
</div>
<div class="section" id="id2">
<h2><a class="toc-backref" href="#id10">11.0.1.0.2 (2018-10-31)</a></h2>
<ul>
<li><p class="first">Fix initialization of 1st domain node</p>
<p>Sometime the dialog is not ready yet, like on EE version.
Expand All @@ -449,8 +485,8 @@ <h2><a class="toc-backref" href="#id7">11.0.1.0.2 (2018-10-31)</a></h2>
</li>
</ul>
</div>
<div class="section" id="id2">
<h2><a class="toc-backref" href="#id8">11.0.1.0.1 (2018-09-18)</a></h2>
<div class="section" id="id3">
<h2><a class="toc-backref" href="#id11">11.0.1.0.1 (2018-09-18)</a></h2>
<ul>
<li><p class="first">Fix <cite>undefined</cite> in x2m fields</p>
<p>Before this patch, when searching with the “equals to” operator in any
Expand All @@ -468,8 +504,8 @@ <h2><a class="toc-backref" href="#id8">11.0.1.0.1 (2018-09-18)</a></h2>
</li>
</ul>
</div>
<div class="section" id="id3">
<h2><a class="toc-backref" href="#id9">11.0.1.0.0 (2018-07-20)</a></h2>
<div class="section" id="id4">
<h2><a class="toc-backref" href="#id12">11.0.1.0.0 (2018-07-20)</a></h2>
<ul>
<li><p class="first">Rename, refactor, migrate to v11</p>
<p>[Yajo]</p>
Expand All @@ -478,24 +514,24 @@ <h2><a class="toc-backref" href="#id9">11.0.1.0.0 (2018-07-20)</a></h2>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id10">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#id13">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_advanced_search%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id11">Credits</a></h1>
<h1><a class="toc-backref" href="#id14">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id12">Authors</a></h2>
<h2><a class="toc-backref" href="#id15">Authors</a></h2>
<ul class="simple">
<li>Therp BV</li>
<li>Tecnativa</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id13">Contributors</a></h2>
<h2><a class="toc-backref" href="#id16">Contributors</a></h2>
<ul class="simple">
<li>Holger Brunn &lt;<a class="reference external" href="mailto:hbrunn&#64;therp.nl">hbrunn&#64;therp.nl</a>&gt;</li>
<li>Rami Alwafaie &lt;<a class="reference external" href="mailto:rami.alwafaie&#64;initos.com">rami.alwafaie&#64;initos.com</a>&gt;</li>
Expand All @@ -512,10 +548,14 @@ <h2><a class="toc-backref" href="#id13">Contributors</a></h2>
<li>Raf Ven</li>
</ul>
</li>
<li><a class="reference external" href="https://therp.nl">Therp BV</a>:<ul>
<li>Ronald Portier</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id14">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id17">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 713641f

Please sign in to comment.