Skip to content

Commit 8cc6e17

Browse files
committed
[16.0][MIG] web_search_with_and.
1 parent 42cd00f commit 8cc6e17

File tree

10 files changed

+133
-211
lines changed

10 files changed

+133
-211
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../web_search_with_and

setup/web_search_with_and/setup.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)

web_search_with_and/README.rst

+8-7
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Use AND conditions on omnibar search
1414
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1515
:alt: License: AGPL-3
1616
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
17-
:target: https://github.com/OCA/web/tree/15.0/web_search_with_and
17+
:target: https://github.com/OCA/web/tree/16.0/web_search_with_and
1818
:alt: OCA/web
1919
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_search_with_and
20+
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_search_with_and
2121
:alt: Translate me on Weblate
22-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/162/15.0
24-
:alt: Try me on Runbot
22+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
23+
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/web&target_branch=16.0
24+
:alt: Try me on Runboat
2525

2626
|badge1| |badge2| |badge3| |badge4| |badge5|
2727

@@ -58,7 +58,7 @@ Bug Tracker
5858
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
5959
In case of trouble, please check there if your issue has already been reported.
6060
If you spotted it first, help us smashing it by providing a detailed and welcomed
61-
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_search_with_and%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
61+
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_search_with_and%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6262

6363
Do not contact contributors directly about support or help with technical issues.
6464

@@ -82,6 +82,7 @@ Contributors
8282
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
8383
* Pedro Guirao <pedro.guirao@ingenieriacloud.com>
8484
* Nedas Žilinskas <nedas.zilinskas@avoin.systems>
85+
* Sandip SerpentCS <sandip.v.serpentcs@gmail.com>
8586

8687
Maintainers
8788
~~~~~~~~~~~
@@ -96,6 +97,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
9697
mission is to support the collaborative development of Odoo features and
9798
promote its widespread use.
9899

99-
This module is part of the `OCA/web <https://github.com/OCA/web/tree/15.0/web_search_with_and>`_ project on GitHub.
100+
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_search_with_and>`_ project on GitHub.
100101

101102
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

web_search_with_and/__manifest__.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44

55
{
66
"name": "Use AND conditions on omnibar search",
7-
"version": "15.0.1.0.0",
8-
"author": "Versada UAB, ACSONE SA/NV, Serincloud, Odoo Community Association (OCA)",
7+
"version": "16.0.1.0.0",
8+
"author": """Sandip SCS, Versada UAB, ACSONE SA/NV, Serincloud,
9+
Odoo Community Association (OCA)""",
910
"license": "AGPL-3",
1011
"category": "web",
1112
"website": "https://github.com/OCA/web",
1213
"depends": ["web"],
1314
"assets": {
1415
"web.assets_backend": [
15-
"/web_search_with_and/static/src/js/control_panel_model_extension.js",
16-
"/web_search_with_and/static/src/js/search_bar.js",
16+
"/web_search_with_and/static/src/js/search_model.esm.js",
17+
"/web_search_with_and/static/src/js/search_bar.esm.js",
1718
],
1819
},
1920
}

web_search_with_and/readme/CONTRIBUTORS.rst

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
66
* Pedro Guirao <pedro.guirao@ingenieriacloud.com>
77
* Nedas Žilinskas <nedas.zilinskas@avoin.systems>
8+
* Sandip SerpentCS <sandip.v.serpentcs@gmail.com>

web_search_with_and/static/description/index.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6-
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
6+
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
77
<title>Use AND conditions on omnibar search</title>
88
<style type="text/css">
99

@@ -367,7 +367,7 @@ <h1 class="title">Use AND conditions on omnibar search</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_search_with_and"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_search_with_and"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
370+
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/16.0/web_search_with_and"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_search_with_and"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/webui/builds.html?repo=OCA/web&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
371371
<p>When searching for records on same field Odoo joins multiple queries with OR.
372372
For example:</p>
373373
<ul class="simple">
@@ -405,7 +405,7 @@ <h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
405405
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
406406
In case of trouble, please check there if your issue has already been reported.
407407
If you spotted it first, help us smashing it by providing a detailed and welcomed
408-
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_search_with_and%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
408+
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_search_with_and%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
409409
<p>Do not contact contributors directly about support or help with technical issues.</p>
410410
</div>
411411
<div class="section" id="credits">
@@ -428,6 +428,7 @@ <h2><a class="toc-backref" href="#id5">Contributors</a></h2>
428428
<li>Souheil Bejaoui &lt;<a class="reference external" href="mailto:souheil.bejaoui&#64;acsone.eu">souheil.bejaoui&#64;acsone.eu</a>&gt;</li>
429429
<li>Pedro Guirao &lt;<a class="reference external" href="mailto:pedro.guirao&#64;ingenieriacloud.com">pedro.guirao&#64;ingenieriacloud.com</a>&gt;</li>
430430
<li>Nedas Žilinskas &lt;<a class="reference external" href="mailto:nedas.zilinskas&#64;avoin.systems">nedas.zilinskas&#64;avoin.systems</a>&gt;</li>
431+
<li>Sandip SerpentCS &lt;<a class="reference external" href="mailto:sandip.v.serpentcs&#64;gmail.com">sandip.v.serpentcs&#64;gmail.com</a>&gt;</li>
431432
</ul>
432433
</div>
433434
<div class="section" id="maintainers">
@@ -437,7 +438,7 @@ <h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
437438
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
438439
mission is to support the collaborative development of Odoo features and
439440
promote its widespread use.</p>
440-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_search_with_and">OCA/web</a> project on GitHub.</p>
441+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/16.0/web_search_with_and">OCA/web</a> project on GitHub.</p>
441442
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
442443
</div>
443444
</div>

web_search_with_and/static/src/js/control_panel_model_extension.js

-56
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/** @odoo-module **/
2+
3+
import {patch} from "@web/core/utils/patch";
4+
import {SearchBar} from "@web/search/search_bar/search_bar";
5+
6+
patch(SearchBar.prototype, "web_search_with_and/static/src/js/search_bar.js", {
7+
selectItem(item) {
8+
if (!item.unselectable) {
9+
const {searchItemId, label, operator, value} = item;
10+
this.env.searchModel.addAutoCompletionValues(searchItemId, {
11+
label,
12+
operator,
13+
value,
14+
isShiftKey: this.isShiftKey,
15+
});
16+
}
17+
this.resetState();
18+
},
19+
onSearchKeydown(ev) {
20+
this.isShiftKey = ev.shiftKey || false;
21+
this._super(ev);
22+
},
23+
});

web_search_with_and/static/src/js/search_bar.js

-140
This file was deleted.

0 commit comments

Comments
 (0)