base_search_fuzzy: Migration to 12.0
parent
5d34cfec46
commit
9039031e2c
|
@ -14,13 +14,13 @@ Fuzzy Search
|
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/server-tools/tree/11.0/base_search_fuzzy
|
||||
:target: https://github.com/OCA/server-tools/tree/12.0/base_search_fuzzy
|
||||
:alt: OCA/server-tools
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/server-tools-11-0/server-tools-11-0-base_search_fuzzy
|
||||
:target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-base_search_fuzzy
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/149/11.0
|
||||
:target: https://runbot.odoo-community.org/runbot/149/12.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
@ -28,7 +28,7 @@ Fuzzy Search
|
|||
This addon provides the ability to create GIN or GiST indexes of char and text
|
||||
fields and also to use the search operator `%` in search domains. Currently
|
||||
this module doesn't change the backend search or anything else. It provides
|
||||
only the possibilty to perfrom the fuzzy search for external addons.
|
||||
only the possibility to perform the fuzzy search for external addons.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
|
@ -66,7 +66,7 @@ Usage
|
|||
|
||||
#. You can tweak the number of strings to be returned by adjusting the set
|
||||
limit (default: 0.3). NB: Currently you have to set the limit by executing
|
||||
the following SQL statment:
|
||||
the following SQL statement:
|
||||
|
||||
``self.env.cr.execute("SELECT set_limit(0.2);")``
|
||||
|
||||
|
@ -93,7 +93,7 @@ Bug Tracker
|
|||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
|
||||
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
|
||||
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_search_fuzzy%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_search_fuzzy%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
|
@ -114,7 +114,11 @@ Contributors
|
|||
* Jordi Ballester <jordi.ballester@eficent.com>
|
||||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
|
||||
* Dave Lasley <dave@laslabs.com>
|
||||
* Vicent Cubells <vicent.cubells@tecnativa.com>
|
||||
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Vicent Cubells
|
||||
* Ernesto Tejeda
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
@ -129,6 +133,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/11.0/base_search_fuzzy>`_ project on GitHub.
|
||||
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/12.0/base_search_fuzzy>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
'name': "Fuzzy Search",
|
||||
'summary': "Fuzzy search with the PostgreSQL trigram extension",
|
||||
'category': 'Uncategorized',
|
||||
'version': '11.0.1.0.0',
|
||||
'website': 'https://odoo-community.org/',
|
||||
'version': '12.0.1.0.0',
|
||||
'website': 'https://github.com/OCA/server-tools',
|
||||
'author': 'bloopark systems GmbH & Co. KG, '
|
||||
'Eficent, '
|
||||
'Serpent CS, '
|
||||
|
|
|
@ -17,6 +17,7 @@ class TrgmIndex(models.Model):
|
|||
|
||||
_name = 'trgm.index'
|
||||
_rec_name = 'field_id'
|
||||
_description = 'Trigram Index'
|
||||
|
||||
field_id = fields.Many2one(
|
||||
comodel_name='ir.model.fields',
|
||||
|
|
|
@ -2,4 +2,8 @@
|
|||
* Jordi Ballester <jordi.ballester@eficent.com>
|
||||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
|
||||
* Dave Lasley <dave@laslabs.com>
|
||||
* Vicent Cubells <vicent.cubells@tecnativa.com>
|
||||
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Vicent Cubells
|
||||
* Ernesto Tejeda
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
This addon provides the ability to create GIN or GiST indexes of char and text
|
||||
fields and also to use the search operator `%` in search domains. Currently
|
||||
this module doesn't change the backend search or anything else. It provides
|
||||
only the possibilty to perfrom the fuzzy search for external addons.
|
||||
only the possibility to perform the fuzzy search for external addons.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#. You can tweak the number of strings to be returned by adjusting the set
|
||||
limit (default: 0.3). NB: Currently you have to set the limit by executing
|
||||
the following SQL statment:
|
||||
the following SQL statement:
|
||||
|
||||
``self.env.cr.execute("SELECT set_limit(0.2);")``
|
||||
|
||||
|
|
|
@ -367,11 +367,11 @@ ul.auto-toc {
|
|||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<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/server-tools/tree/11.0/base_search_fuzzy"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-tools-11-0/server-tools-11-0-base_search_fuzzy"><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/149/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<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/server-tools/tree/12.0/base_search_fuzzy"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-base_search_fuzzy"><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/149/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This addon provides the ability to create GIN or GiST indexes of char and text
|
||||
fields and also to use the search operator <cite>%</cite> in search domains. Currently
|
||||
this module doesn’t change the backend search or anything else. It provides
|
||||
only the possibilty to perfrom the fuzzy search for external addons.</p>
|
||||
only the possibility to perform the fuzzy search for external addons.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
|
@ -420,7 +420,7 @@ or <cite>John Mill</cite>.</p>
|
|||
</li>
|
||||
<li><p class="first">You can tweak the number of strings to be returned by adjusting the set
|
||||
limit (default: 0.3). NB: Currently you have to set the limit by executing
|
||||
the following SQL statment:</p>
|
||||
the following SQL statement:</p>
|
||||
<p><tt class="docutils literal"><span class="pre">self.env.cr.execute("SELECT</span> <span class="pre">set_limit(0.2);")</span></tt></p>
|
||||
</li>
|
||||
<li><p class="first">Another interesting feature is the use of <tt class="docutils literal">similarity(column, 'text')</tt>
|
||||
|
@ -446,7 +446,7 @@ followed:</p>
|
|||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/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/server-tools/issues/new?body=module:%20base_search_fuzzy%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_search_fuzzy%0Aversion:%2012.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">
|
||||
|
@ -466,7 +466,11 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
<li>Jordi Ballester <<a class="reference external" href="mailto:jordi.ballester@eficent.com">jordi.ballester@eficent.com</a>></li>
|
||||
<li>Serpent Consulting Services Pvt. Ltd. <<a class="reference external" href="mailto:support@serpentcs.com">support@serpentcs.com</a>></li>
|
||||
<li>Dave Lasley <<a class="reference external" href="mailto:dave@laslabs.com">dave@laslabs.com</a>></li>
|
||||
<li>Vicent Cubells <<a class="reference external" href="mailto:vicent.cubells@tecnativa.com">vicent.cubells@tecnativa.com</a>></li>
|
||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||
<li>Vicent Cubells</li>
|
||||
<li>Ernesto Tejeda</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
|
@ -476,7 +480,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/11.0/base_search_fuzzy">OCA/server-tools</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/12.0/base_search_fuzzy">OCA/server-tools</a> project on GitHub.</p>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -74,7 +74,7 @@ class QueryGenerationCase(TransactionCase):
|
|||
return
|
||||
|
||||
if not self.TrgmIndex.index_exists('res.partner', 'name'):
|
||||
field_partner_name = self.env.ref('base.field_res_partner_name')
|
||||
field_partner_name = self.env.ref('base.field_res_partner__name')
|
||||
self.TrgmIndex.create({
|
||||
'field_id': field_partner_name.id,
|
||||
'index_type': 'gin',
|
||||
|
|
Loading…
Reference in New Issue