Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ exclude: |
(?x)
# NOT INSTALLABLE ADDONS
^connector_algolia/|
^connector_elasticsearch/|
^connector_search_engine_serializer_ir_export/|
^search_engine_image_thumbnail/|
# END NOT INSTALLABLE ADDONS
Expand Down
46 changes: 20 additions & 26 deletions connector_elasticsearch/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=======================
connector_elasticsearch
=======================
Expand All @@ -17,25 +13,23 @@ connector_elasticsearch
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsearch--engine-lightgray.png?logo=github
:target: https://github.com/OCA/search-engine/tree/16.0/connector_elasticsearch
:target: https://github.com/OCA/search-engine/tree/18.0/connector_elasticsearch
:alt: OCA/search-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/search-engine-16-0/search-engine-16-0-connector_elasticsearch
:target: https://translation.odoo-community.org/projects/search-engine-18-0/search-engine-18-0-connector_elasticsearch
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/search-engine&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/search-engine&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This addon provides the bases to implement addons to export information to
Elasticsearch_ indexes.

.. _Elasticsearch: https://www.elastic.co/
This addon provides the bases to implement addons to export information
to `Elasticsearch <https://www.elastic.co/>`__ indexes.

**Table of contents**

Expand All @@ -46,41 +40,41 @@ Changelog
=========

12.0.?.?.? (unreleased)
~~~~~~~~~~~~~~~~~~~~~~~
-----------------------

* connector_elasticsearch: Makes the config on index required only if the
index is linked to an elastisearch backend. This change allows the usage
of algolia search engine at the same time as elasticsearch.
- connector_elasticsearch: Makes the config on index required only if
the index is linked to an elastisearch backend. This change allows the
usage of algolia search engine at the same time as elasticsearch.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/search-engine/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/search-engine/issues/new?body=module:%20connector_elasticsearch%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/search-engine/issues/new?body=module:%20connector_elasticsearch%0Aversion:%2018.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.

Credits
=======

Authors
~~~~~~~
-------

* ACSONE SA/NV

Contributors
~~~~~~~~~~~~
------------

* Laurent Corron <laurentcorron@gmail.com>
* Laurent Mignon <laurent.mignon@acsone.eu>
* Raphaël Reverdy <raphael.reverdy@akretion.com>
* Simone Orsi <simone.orsi@camptocamp.com>
* Iván Todorovich <ivan.todorovich@camptocamp.com>
- Laurent Corron <laurentcorron@gmail.com>
- Laurent Mignon <laurent.mignon@acsone.eu>
- Raphaël Reverdy <raphael.reverdy@akretion.com>
- Simone Orsi <simone.orsi@camptocamp.com>
- Iván Todorovich <ivan.todorovich@camptocamp.com>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -92,6 +86,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/search-engine <https://github.com/OCA/search-engine/tree/16.0/connector_elasticsearch>`_ project on GitHub.
This module is part of the `OCA/search-engine <https://github.com/OCA/search-engine/tree/18.0/connector_elasticsearch>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 2 additions & 2 deletions connector_elasticsearch/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "connector_elasticsearch",
"category": "Connector",
"summary": "Connector For Elasticsearch Search Engine",
"version": "16.0.1.0.0",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/search-engine",
Expand All @@ -16,5 +16,5 @@
"demo": ["demo/backend_demo.xml"],
# TODO: Get latest improvements from elasticsearch library
"external_dependencies": {"python": ["elasticsearch>=7.0.0,<=7.13.4", "requests"]},
"installable": False,
"installable": True,
}
5 changes: 2 additions & 3 deletions connector_elasticsearch/models/se_index.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, models
from odoo import api, models
from odoo.exceptions import ValidationError


class SeIndex(models.Model):

_inherit = "se.index"

@api.constrains("config_id", "backend_id")
def _check_config_id_required(self):
for rec in self:
if rec.backend_id.backend_type == "elasticsearch" and not rec.config_id:
raise ValidationError(
_("An index definition is required for ElasticSearch")
self.env._("An index definition is required for ElasticSearch")
)
3 changes: 3 additions & 0 deletions connector_elasticsearch/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions connector_elasticsearch/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Laurent Corron \<laurentcorron@gmail.com\>
- Laurent Mignon \<laurent.mignon@acsone.eu\>
- Raphaël Reverdy \<raphael.reverdy@akretion.com\>
- Simone Orsi \<simone.orsi@camptocamp.com\>
- Iván Todorovich \<ivan.todorovich@camptocamp.com\>
5 changes: 0 additions & 5 deletions connector_elasticsearch/readme/CONTRIBUTORS.rst

This file was deleted.

2 changes: 2 additions & 0 deletions connector_elasticsearch/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This addon provides the bases to implement addons to export information
to [Elasticsearch](https://www.elastic.co/) indexes.
4 changes: 0 additions & 4 deletions connector_elasticsearch/readme/DESCRIPTION.rst

This file was deleted.

5 changes: 5 additions & 0 deletions connector_elasticsearch/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## 12.0.?.?.? (unreleased)

- connector_elasticsearch: Makes the config on index required only if
the index is linked to an elastisearch backend. This change allows the
usage of algolia search engine at the same time as elasticsearch.
6 changes: 0 additions & 6 deletions connector_elasticsearch/readme/HISTORY.rst

This file was deleted.

42 changes: 18 additions & 24 deletions connector_elasticsearch/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>connector_elasticsearch</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,23 +360,18 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="connector-elasticsearch">
<h1 class="title">connector_elasticsearch</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="connector-elasticsearch">
<h1>connector_elasticsearch</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:49f181e532101280fbb24682697db3c18f459b0033f8ba1618991efa91926f8c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/search-engine/tree/16.0/connector_elasticsearch"><img alt="OCA/search-engine" src="https://img.shields.io/badge/github-OCA%2Fsearch--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/search-engine-16-0/search-engine-16-0-connector_elasticsearch"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/search-engine&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This addon provides the bases to implement addons to export information to
<a class="reference external" href="https://www.elastic.co/">Elasticsearch</a> indexes.</p>
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/search-engine/tree/18.0/connector_elasticsearch"><img alt="OCA/search-engine" src="https://img.shields.io/badge/github-OCA%2Fsearch--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/search-engine-18-0/search-engine-18-0-connector_elasticsearch"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/search-engine&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This addon provides the bases to implement addons to export information
to <a class="reference external" href="https://www.elastic.co/">Elasticsearch</a> indexes.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -394,34 +389,34 @@ <h1>connector_elasticsearch</h1>
</ul>
</div>
<div class="section" id="changelog">
<h2><a class="toc-backref" href="#toc-entry-1">Changelog</a></h2>
<h1><a class="toc-backref" href="#toc-entry-1">Changelog</a></h1>
<div class="section" id="unreleased">
<h3><a class="toc-backref" href="#toc-entry-2">12.0.?.?.? (unreleased)</a></h3>
<h2><a class="toc-backref" href="#toc-entry-2">12.0.?.?.? (unreleased)</a></h2>
<ul class="simple">
<li>connector_elasticsearch: Makes the config on index required only if the
index is linked to an elastisearch backend. This change allows the usage
of algolia search engine at the same time as elasticsearch.</li>
<li>connector_elasticsearch: Makes the config on index required only if
the index is linked to an elastisearch backend. This change allows the
usage of algolia search engine at the same time as elasticsearch.</li>
</ul>
</div>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/search-engine/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 to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/search-engine/issues/new?body=module:%20connector_elasticsearch%0Aversion:%2016.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/search-engine/issues/new?body=module:%20connector_elasticsearch%0Aversion:%2018.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">
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
<ul class="simple">
<li>ACSONE SA/NV</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul class="simple">
<li>Laurent Corron &lt;<a class="reference external" href="mailto:laurentcorron&#64;gmail.com">laurentcorron&#64;gmail.com</a>&gt;</li>
<li>Laurent Mignon &lt;<a class="reference external" href="mailto:laurent.mignon&#64;acsone.eu">laurent.mignon&#64;acsone.eu</a>&gt;</li>
Expand All @@ -431,19 +426,18 @@ <h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
<h2><a class="toc-backref" href="#toc-entry-7">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
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/search-engine/tree/16.0/connector_elasticsearch">OCA/search-engine</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/search-engine/tree/18.0/connector_elasticsearch">OCA/search-engine</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>
</div>
</div>
</body>
</html>
Loading
Loading