Skip to content

Commit 3b6e7b9

Browse files
committed
Merge PR #494 into 18.0
Signed-off-by simahawk
2 parents 78ffbf3 + 69c0896 commit 3b6e7b9

File tree

141 files changed

+20917
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+20917
-0
lines changed

connector/README.rst

+166
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
=========
2+
Connector
3+
=========
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:c3fb5d7af399741b082a3725c3698dd038043c4a6a855da345ea1f9f9cb3a979
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
18+
:alt: License: LGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fconnector-lightgray.png?logo=github
20+
:target: https://github.com/OCA/connector/tree/18.0/connector
21+
:alt: OCA/connector
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/connector-18-0/connector-18-0-connector
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/connector&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This is a framework designed to build connectors with external systems,
32+
usually called ``Backends`` in the documentation.
33+
34+
Documentation: http://odoo-connector.com
35+
36+
It features:
37+
38+
- A jobs queue
39+
40+
In which the connectors can push functions (synchronization tasks)
41+
to be executed later.
42+
43+
- An event pattern
44+
45+
The connectors can subscribe listener functions on the events,
46+
executed when the events are fired.
47+
48+
- Connector base classes
49+
50+
Called ``ConnectorUnit``.
51+
52+
Include base classes for the use in connectors, ready to be
53+
extended:
54+
55+
- ``Synchronizer``: flow of an import or export
56+
- ``Mapper``: transform a record according to mapping rules
57+
- ``Binder``: link external IDs with local IDS
58+
- ``BackendAdapter``: adapter interface for the exchanges with
59+
the backend
60+
- But ``ConnectorUnit`` can be extended to accomplish any task
61+
62+
- A multi-backend support
63+
64+
Each ``ConnectorUnit`` can be registered amongst a backend type
65+
(eg. Magento) and a backend version (allow to have a different
66+
``Mapper`` for each backend's version for instance)
67+
68+
It is used for example used to connect
69+
`Magento <http://odoo-magento-connector.com>`__ and
70+
`Prestashop <https://github.com/OCA/connector-prestashop>`__, but also
71+
used with Solr, CMIS, ...
72+
73+
**Table of contents**
74+
75+
.. contents::
76+
:local:
77+
78+
Usage
79+
=====
80+
81+
This module does nothing on its own. It is a ground for developing
82+
advanced connector modules. For further information, please go on:
83+
http://odoo-connector.com
84+
85+
Changelog
86+
=========
87+
88+
Next
89+
----
90+
91+
12.0.1.0.0 (2018-11-26)
92+
-----------------------
93+
94+
- [MIGRATION] from 12.0 branched at rev. 324e006
95+
96+
Bug Tracker
97+
===========
98+
99+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/connector/issues>`_.
100+
In case of trouble, please check there if your issue has already been reported.
101+
If you spotted it first, help us to smash it by providing a detailed and welcomed
102+
`feedback <https://github.com/OCA/connector/issues/new?body=module:%20connector%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
103+
104+
Do not contact contributors directly about support or help with technical issues.
105+
106+
Credits
107+
=======
108+
109+
Authors
110+
-------
111+
112+
* Camptocamp
113+
114+
Contributors
115+
------------
116+
117+
- Guewen Baconnier at Camptocamp
118+
- Alexandre Fayolle at Camptocamp
119+
- Benoit Guillot at Akretion
120+
- Nicolas Bessi at Camptocamp
121+
- Joël Grand-Guillaume at Camptocamp
122+
- Arthur Vuillard at Akretion
123+
- Sebastien Beau at Akretion
124+
- Laurent Mignon at Acsone
125+
- Leonardo Pistone at Camptocamp
126+
- David Béal at Akretion
127+
- Christophe Combelles at Anybox
128+
- Stéphane Bidoul at Acsone
129+
- Malte Jacobi at IBO / HTW
130+
- Laetitia Gangloff at Acsone
131+
- David Lefever at Taktik S.A.
132+
- Jos de Graeve at Apertoso NV
133+
- Jean-Sébastien Suzanne at Anybox
134+
- Leonardo Donelli at MONK Software
135+
- Mathias Colpaert
136+
- Yannick Vaucher at Camptocamp
137+
- Nicolas Piganeau at NDP Systèmes
138+
- Florent Thomas at Mind And Go
139+
- Matthieu Dietrich at Camptocamp
140+
- Olivier Laurent at Acsone
141+
- Eric Antones at NuoBiT Solutions S.L.
142+
- Asier Neira at Factor Libre S.L.
143+
- Nguyen Minh Chien at Trobz.
144+
145+
Other credits
146+
-------------
147+
148+
The migration of this module from 17.0 to 18.0 was financially supported
149+
by Camptocamp.
150+
151+
Maintainers
152+
-----------
153+
154+
This module is maintained by the OCA.
155+
156+
.. image:: https://odoo-community.org/logo.png
157+
:alt: Odoo Community Association
158+
:target: https://odoo-community.org
159+
160+
OCA, or the Odoo Community Association, is a nonprofit organization whose
161+
mission is to support the collaborative development of Odoo features and
162+
promote its widespread use.
163+
164+
This module is part of the `OCA/connector <https://github.com/OCA/connector/tree/18.0/connector>`_ project on GitHub.
165+
166+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

connector/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import components
2+
from . import models

connector/__manifest__.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2013 Camptocamp SA
2+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
3+
4+
{
5+
"name": "Connector",
6+
"version": "18.0.1.0.0",
7+
"author": "Camptocamp,Odoo Community Association (OCA)",
8+
"website": "https://github.com/OCA/connector",
9+
"license": "LGPL-3",
10+
"category": "Generic Modules",
11+
"depends": ["mail", "queue_job", "component", "component_event"],
12+
"data": [
13+
"security/connector_security.xml",
14+
"views/connector_menu.xml",
15+
"views/res_partner_views.xml",
16+
],
17+
"installable": True,
18+
}

connector/components/__init__.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from . import core
2+
from . import backend_adapter
3+
from . import binder
4+
from . import mapper
5+
from . import listener
6+
from . import locker
7+
from . import synchronizer
+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 2013 Camptocamp SA
2+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
3+
4+
"""
5+
6+
Backend Adapter
7+
===============
8+
9+
An external adapter has a common interface to speak with the backend.
10+
It translates the basic orders (search, read, write) to the protocol
11+
used by the backend.
12+
13+
"""
14+
15+
from odoo.addons.component.core import AbstractComponent
16+
17+
18+
class BackendAdapter(AbstractComponent):
19+
"""Base Backend Adapter for the connectors"""
20+
21+
_name = "base.backend.adapter"
22+
_inherit = "base.connector"
23+
_usage = "backend.adapter"
24+
25+
26+
# pylint: disable=W8106
27+
class CRUDAdapter(AbstractComponent):
28+
"""Base External Adapter specialized in the handling
29+
of records on external systems.
30+
31+
This is an empty shell, Components can inherit and implement their own
32+
implementation for the methods.
33+
34+
"""
35+
36+
_name = "base.backend.adapter.crud"
37+
_inherit = "base.backend.adapter"
38+
_usage = "backend.adapter"
39+
40+
def search(self, *args, **kwargs):
41+
"""Search records according to some criterias
42+
and returns a list of ids"""
43+
raise NotImplementedError
44+
45+
def read(self, *args, **kwargs):
46+
"""Returns the information of a record"""
47+
raise NotImplementedError
48+
49+
def search_read(self, *args, **kwargs):
50+
"""Search records according to some criterias
51+
and returns their information"""
52+
raise NotImplementedError
53+
54+
def create(self, *args, **kwargs):
55+
"""Create a record on the external system"""
56+
raise NotImplementedError
57+
58+
def write(self, *args, **kwargs):
59+
"""Update records on the external system"""
60+
raise NotImplementedError
61+
62+
def delete(self, *args, **kwargs):
63+
"""Delete a record on the external system"""
64+
raise NotImplementedError

0 commit comments

Comments
 (0)