Skip to content

Commit

Permalink
Merge pull request #1094 from simahawk/11-fix-web_advanced_search
Browse files Browse the repository at this point in the history
[11.0] web_advanced_search: fix initialization of 1st domain node + add changelog
  • Loading branch information
pedrobaeza authored Oct 31, 2018
2 parents 6a90d1b + 50bb38d commit dca8081
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 17 deletions.
46 changes: 46 additions & 0 deletions web_advanced_search/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,50 @@ Improvements to the search view in this addon:
* Beautiful, human-readable, domain representation when adding an
advanced filter

Changelog
=========

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

* Fix initialization of 1st domain node

Sometime the dialog is not ready yet, like on EE version.
Hence when you inject the 1st domain node
the dialog must be already opened.

[simahawk]


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

* Fix `undefined` in x2m fields

Before this patch, when searching with the "equals to" operator in any
x2many field, the searched parameter was always `undefined`.

The problem was that the underlying field manager implementation was
treating those fields as x2many, while the widget used was the `one2many`
one.

This patch simply mocks the underlying fake record to make think that
any relational field is always a `one2many`. This sets all pieces in
place and makes the field manager work as expected, and thus you can
search as expected too.

* Make linter happy

[Yajo]


11.0.1.0.0 (2018-07-20)
~~~~~~~~~~~~~~~~~~~~~~~

* Rename, refactor, migrate to v11

[Yajo]

Bug Tracker
===========

Expand All @@ -93,6 +137,7 @@ Authors

* Therp BV
* Tecnativa
* Camptocamp

Contributors
~~~~~~~~~~~~
Expand All @@ -102,6 +147,7 @@ Contributors
* Jairo Llopis <[email protected]>
* Rami Alwafaie <[email protected]>
* Jose Mª Bernet <[email protected]>
* Simone Orsi <[email protected]>

Maintainers
~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion web_advanced_search/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
"name": "Advanced search",
"version": "11.0.1.0.0",
"version": "11.0.1.0.2",
"author": "Therp BV, "
"Tecnativa, "
"Odoo Community Association (OCA)",
Expand Down
1 change: 1 addition & 0 deletions web_advanced_search/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
* Jairo Llopis <[email protected]>
* Rami Alwafaie <[email protected]>
* Jose Mª Bernet <[email protected]>
* Simone Orsi <[email protected]>
40 changes: 40 additions & 0 deletions web_advanced_search/readme/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
11.0.1.0.2 (2018-10-31)
~~~~~~~~~~~~~~~~~~~~~~~

* Fix initialization of 1st domain node

Sometime the dialog is not ready yet, like on EE version.
Hence when you inject the 1st domain node
the dialog must be already opened.

[simahawk]


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

* Fix `undefined` in x2m fields

Before this patch, when searching with the "equals to" operator in any
x2many field, the searched parameter was always `undefined`.

The problem was that the underlying field manager implementation was
treating those fields as x2many, while the widget used was the `one2many`
one.

This patch simply mocks the underlying fake record to make think that
any relational field is always a `one2many`. This sets all pieces in
place and makes the field manager work as expected, and thus you can
search as expected too.

* Make linter happy

[Yajo]


11.0.1.0.0 (2018-07-20)
~~~~~~~~~~~~~~~~~~~~~~~

* Rename, refactor, migrate to v11

[Yajo]
77 changes: 63 additions & 14 deletions web_advanced_search/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,19 +372,25 @@ <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="id1">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id2">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
<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>
</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>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
<h1><a class="toc-backref" href="#id4">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 @@ -408,7 +414,7 @@ <h1><a class="toc-backref" href="#id1">Usage</a></h1>
to a journal which has a user who is member of a certain group etc.</p>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
<h1><a class="toc-backref" href="#id5">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 @@ -425,35 +431,78 @@ <h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
advanced filter</li>
</ul>
</div>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#id6">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>
<ul>
<li><p class="first">Fix initialization of 1st domain node</p>
<p>Sometime the dialog is not ready yet, like on EE version.
Hence when you inject the 1st domain node
the dialog must be already opened.</p>
<p>[simahawk]</p>
</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>
<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
x2many field, the searched parameter was always <cite>undefined</cite>.</p>
<p>The problem was that the underlying field manager implementation was
treating those fields as x2many, while the widget used was the <cite>one2many</cite>
one.</p>
<p>This patch simply mocks the underlying fake record to make think that
any relational field is always a <cite>one2many</cite>. This sets all pieces in
place and makes the field manager work as expected, and thus you can
search as expected too.</p>
</li>
<li><p class="first">Make linter happy</p>
<p>[Yajo]</p>
</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>
<ul>
<li><p class="first">Rename, refactor, migrate to v11</p>
<p>[Yajo]</p>
</li>
</ul>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#id10">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:%2011.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="#id4">Credits</a></h1>
<h1><a class="toc-backref" href="#id11">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
<h2><a class="toc-backref" href="#id12">Authors</a></h2>
<ul class="simple">
<li>Therp BV</li>
<li>Tecnativa</li>
<li>Camptocamp</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<h2><a class="toc-backref" href="#id13">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>Vicent Cubells &lt;<a class="reference external" href="mailto:vicent.cubells&#64;tecnativa.com">vicent.cubells&#64;tecnativa.com</a>&gt;</li>
<li>Jairo Llopis &lt;<a class="reference external" href="mailto:jairo.llopis&#64;tecnativa.com">jairo.llopis&#64;tecnativa.com</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>
<li>Jose Mª Bernet &lt;<a class="reference external" href="mailto:josemaria.bernet&#64;guadaltech.es">josemaria.bernet&#64;guadaltech.es</a>&gt;</li>
<li>Simone Orsi &lt;<a class="reference external" href="mailto:simone.orsi&#64;camptocamp.com">simone.orsi&#64;camptocamp.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id14">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
6 changes: 4 additions & 2 deletions web_advanced_search/static/src/js/web_advanced_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ odoo.define("web_advanced_search", function (require) {
readonly: false,
}
);
// Add 1st domain node by default
domain_selector_dialog.domainSelector._onAddFirstButtonClick();
domain_selector_dialog.opened(function () {
// Add 1st domain node by default
domain_selector_dialog.domainSelector._onAddFirstButtonClick();
});
return domain_selector_dialog.open();
},

Expand Down

0 comments on commit dca8081

Please sign in to comment.