diff --git a/base_external_system_odoorpc/README.rst b/base_external_system_odoorpc/README.rst new file mode 100644 index 000000000..f5cf6fbd4 --- /dev/null +++ b/base_external_system_odoorpc/README.rst @@ -0,0 +1,170 @@ +============================= +Base External System Odoo-rpc +============================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:20d12d3cfcde25ec6b4bf6bbe373bcaf9912377ac081a1dff9d9b4e5e4d7d036 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/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%2Fserver--backend-lightgray.png?logo=github + :target: https://github.com/OCA/server-backend/tree/16.0/base_external_system_odoorpc + :alt: OCA/server-backend +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-backend-16-0/server-backend-16-0-base_external_system_odoorpc + :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/server-backend&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +============================ +Base External System OdooRPC +============================ + +This module adds an *external system adapter* for connecting to another Odoo instance +using the Python ``odoorpc`` client (JSON-RPC). + +It is built on top of ``base_external_system`` and implements a new adapter model: + +* ``external.system.odoo`` (System Type: *External System RPC*) + +The adapter supports: + +* Validating required connection parameters (host, port, database, username, password) +* Optional SSL transport (JSON-RPC over SSL) +* A context-managed client lifecycle via the ``base_external_system`` adapter contract + (open client, perform calls, logout/cleanup) + +Typical use cases include: + +* Reading data from a legacy Odoo (e.g. Odoo 8/9/10) into a newer Odoo (e.g. Odoo 16) +* Synchronizations, migrations, or import tools that must query remote models + (e.g. ``stock.production.lot``, ``stock.move``, ``res.partner``) via RPC + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +This module requires the Python package ``odoorpc`` to be installed in the same +environment as your Odoo server. + +Install it with pip, for example:: + + pip install odoorpc + +Then install the Odoo module in the Apps menu as usual. + +If you run Odoo in Docker or another containerized setup, ensure the dependency +is present in the image that runs the Odoo server. + +Configuration +============= + +1. Go to *Settings → External Systems* (menu provided by ``base_external_system``). +2. Create a new record. +3. Set **System Type** to *External System RPC* (``external.system.odoo``). +4. Fill in the connection parameters: + + * Host (e.g. ``odoo-test.odoo.org``) + * Port (e.g. ``443`` or ``8069``) + * Database name + * Username + * Password + * SSL toggle (if applicable) + +5. Save the record. + +After saving, the adapter interface record is created automatically by +``base_external_system`` and is available via the ``interface`` field. + +Usage +===== + +Test connection (UI) + + +Open an external system record configured with System Type *External System RPC* +and click the *Test Connection* button. + +If successful, the adapter will report success (using the success mechanism +provided by ``base_external_system``). + +Using the client in code + + +Use the standard context manager from ``base_external_system``:: + + system = self.env.ref("your_module.external_system_odoo_remote") + with system.client() as odoo: + partner_model = odoo.env["res.partner"] + ids = partner_model.search([("is_company", "=", True)], limit=10) + data = partner_model.read(ids, ["name"]) + +The yielded object is an ``odoorpc.ODOO`` client instance, so any remote model can be +accessed via ``odoo.env["model.name"]``. + +Legacy helper (optional) + + +Some projects historically called a helper directly on the adapter record:: + + odoo = system.interface._connect() + +If your adapter keeps that helper for backward compatibility, it returns the same +client object as ``external_get_client()``. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Therp BV + +Contributors +~~~~~~~~~~~~ + +* Therp BV +* Nikos Tsirintanis + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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-backend `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_external_system_odoorpc/__init__.py b/base_external_system_odoorpc/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/base_external_system_odoorpc/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/base_external_system_odoorpc/__manifest__.py b/base_external_system_odoorpc/__manifest__.py new file mode 100644 index 000000000..96513584f --- /dev/null +++ b/base_external_system_odoorpc/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2026 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Base External System Odoo-rpc", + "summary": "Connect to a remote Odoo instance via the odoorpc library.", + "version": "16.0.1.0.0", + "category": "Base", + "website": "https://github.com/OCA/server-backend", + "author": "Therp BV, " "Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": ["base_external_system"], + "external_dependencies": {"python": ["odoorpc"]}, + "data": [ + "demo/external_system_odoo_demo.xml", + "security/ir.model.access.csv", + "views/external_system_views.xml", + ], +} diff --git a/base_external_system_odoorpc/demo/external_system_odoo_demo.xml b/base_external_system_odoorpc/demo/external_system_odoo_demo.xml new file mode 100644 index 000000000..526bf760b --- /dev/null +++ b/base_external_system_odoorpc/demo/external_system_odoo_demo.xml @@ -0,0 +1,18 @@ + + + + + External connection via RPC + external.system.odoo + localhost + 8069 + odoo16 + admin + admin + 0 + + + diff --git a/base_external_system_odoorpc/models/__init__.py b/base_external_system_odoorpc/models/__init__.py new file mode 100644 index 000000000..e2281c20f --- /dev/null +++ b/base_external_system_odoorpc/models/__init__.py @@ -0,0 +1,2 @@ +from . import external_system +from . import external_system_odoo diff --git a/base_external_system_odoorpc/models/external_system.py b/base_external_system_odoorpc/models/external_system.py new file mode 100644 index 000000000..7ebb8d70f --- /dev/null +++ b/base_external_system_odoorpc/models/external_system.py @@ -0,0 +1,19 @@ +# Copyright 2026 Therp BV . +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ExternalSystem(models.Model): + """Extend base external system""" + + _inherit = "external.system" + + db_name = fields.Char( + string="Database", + help="Input database name", + ) + is_ssl = fields.Boolean( + string="SSL", + help="Change protocol if SSL", + ) diff --git a/base_external_system_odoorpc/models/external_system_odoo.py b/base_external_system_odoorpc/models/external_system_odoo.py new file mode 100644 index 000000000..da5131bbb --- /dev/null +++ b/base_external_system_odoorpc/models/external_system_odoo.py @@ -0,0 +1,79 @@ +# Copyright 2026 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +import logging +from urllib.error import URLError + +import odoorpc + +from odoo import _, models +from odoo.exceptions import ValidationError + +_logger = logging.getLogger(__name__) + + +class ExternalSystemOdoo(models.Model): + """This is an Interface implementing the RPC module.""" + + _name = "external.system.odoo" + _inherit = "external.system.adapter" + _description = "External System RPC" + + def external_get_client(self): + """Return a usable client representing the remote system.""" + self.ensure_one() + return self._connect() + + def external_destroy_client(self, client): + """Cleanup the client connection""" + self.ensure_one() + try: + if client: + client.logout() + except Exception as exc: + _logger.debug( + "Failed to logout OdooRPC client for %s: %s", self.display_name, exc + ) + return super().external_destroy_client(client) + + def external_test_connection(self): + """Test connection in the UI.""" + self.ensure_one() + try: + with self.client() as odoo: + user_model = odoo.env["res.users"] + ids = user_model.search([("login", "=", "admin")]) + if not ids: + raise ValidationError( + _("Connected, but could not find admin user.") + ) + user_model.read([ids[0]], ["name"])[0] + except ValidationError: + raise + except Exception as e: + raise ValidationError(_("Connection failed.\n\nDETAIL: %s") % e) from e + return super().external_test_connection() + + def _connect(self): + """Return connection object""" + self.ensure_one() + if not all([self.host, self.port, self.db_name, self.username, self.password]): + raise ValidationError( + _( + "Connection failed. Please make sure that all fields " + "are filled: Database, Host, Port, Username, Password." + ) + ) + try: + odoo = odoorpc.ODOO( + self.host, + port=self.port, + protocol="jsonrpc+ssl" if self.is_ssl else "jsonrpc", + ) + except URLError as exc: + raise ValidationError( + _("Could not connect the Odoo server at %(host)s:%(port)s") + % {"host": self.host, "port": self.port} + ) from exc + odoo.login(self.db_name, self.username, self.password) + return odoo diff --git a/base_external_system_odoorpc/readme/CONFIGURE.rst b/base_external_system_odoorpc/readme/CONFIGURE.rst new file mode 100644 index 000000000..ba54a5c42 --- /dev/null +++ b/base_external_system_odoorpc/readme/CONFIGURE.rst @@ -0,0 +1,16 @@ +1. Go to *Settings → External Systems* (menu provided by ``base_external_system``). +2. Create a new record. +3. Set **System Type** to *External System RPC* (``external.system.odoo``). +4. Fill in the connection parameters: + + * Host (e.g. ``odoo-test.odoo.org``) + * Port (e.g. ``443`` or ``8069``) + * Database name + * Username + * Password + * SSL toggle (if applicable) + +5. Save the record. + +After saving, the adapter interface record is created automatically by +``base_external_system`` and is available via the ``interface`` field. diff --git a/base_external_system_odoorpc/readme/CONTRIBUTORS.rst b/base_external_system_odoorpc/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..edf079344 --- /dev/null +++ b/base_external_system_odoorpc/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Therp BV +* Nikos Tsirintanis diff --git a/base_external_system_odoorpc/readme/DESCRIPTION.rst b/base_external_system_odoorpc/readme/DESCRIPTION.rst new file mode 100644 index 000000000..fe29b7d07 --- /dev/null +++ b/base_external_system_odoorpc/readme/DESCRIPTION.rst @@ -0,0 +1,23 @@ +============================ +Base External System OdooRPC +============================ + +This module adds an *external system adapter* for connecting to another Odoo instance +using the Python ``odoorpc`` client (JSON-RPC). + +It is built on top of ``base_external_system`` and implements a new adapter model: + +* ``external.system.odoo`` (System Type: *External System RPC*) + +The adapter supports: + +* Validating required connection parameters (host, port, database, username, password) +* Optional SSL transport (JSON-RPC over SSL) +* A context-managed client lifecycle via the ``base_external_system`` adapter contract + (open client, perform calls, logout/cleanup) + +Typical use cases include: + +* Reading data from a legacy Odoo (e.g. Odoo 8/9/10) into a newer Odoo (e.g. Odoo 16) +* Synchronizations, migrations, or import tools that must query remote models + (e.g. ``stock.production.lot``, ``stock.move``, ``res.partner``) via RPC diff --git a/base_external_system_odoorpc/readme/INSTALL.rst b/base_external_system_odoorpc/readme/INSTALL.rst new file mode 100644 index 000000000..f8bec8c0a --- /dev/null +++ b/base_external_system_odoorpc/readme/INSTALL.rst @@ -0,0 +1,11 @@ +This module requires the Python package ``odoorpc`` to be installed in the same +environment as your Odoo server. + +Install it with pip, for example:: + + pip install odoorpc + +Then install the Odoo module in the Apps menu as usual. + +If you run Odoo in Docker or another containerized setup, ensure the dependency +is present in the image that runs the Odoo server. diff --git a/base_external_system_odoorpc/readme/USAGE.rst b/base_external_system_odoorpc/readme/USAGE.rst new file mode 100644 index 000000000..327756b2e --- /dev/null +++ b/base_external_system_odoorpc/readme/USAGE.rst @@ -0,0 +1,32 @@ +Test connection (UI) + + +Open an external system record configured with System Type *External System RPC* +and click the *Test Connection* button. + +If successful, the adapter will report success (using the success mechanism +provided by ``base_external_system``). + +Using the client in code + + +Use the standard context manager from ``base_external_system``:: + + system = self.env.ref("your_module.external_system_odoo_remote") + with system.client() as odoo: + partner_model = odoo.env["res.partner"] + ids = partner_model.search([("is_company", "=", True)], limit=10) + data = partner_model.read(ids, ["name"]) + +The yielded object is an ``odoorpc.ODOO`` client instance, so any remote model can be +accessed via ``odoo.env["model.name"]``. + +Legacy helper (optional) + + +Some projects historically called a helper directly on the adapter record:: + + odoo = system.interface._connect() + +If your adapter keeps that helper for backward compatibility, it returns the same +client object as ``external_get_client()``. diff --git a/base_external_system_odoorpc/security/ir.model.access.csv b/base_external_system_odoorpc/security/ir.model.access.csv new file mode 100644 index 000000000..c81e32a16 --- /dev/null +++ b/base_external_system_odoorpc/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_external_system_odoo_admin,access_external_system_odoo_admin,model_external_system_odoo,base.group_system,1,1,1,1 diff --git a/base_external_system_odoorpc/static/description/index.html b/base_external_system_odoorpc/static/description/index.html new file mode 100644 index 000000000..5ffa3c774 --- /dev/null +++ b/base_external_system_odoorpc/static/description/index.html @@ -0,0 +1,509 @@ + + + + + +README.rst + + + +
+ + +
+

Base External System Odoo-rpc

+ +

Beta License: AGPL-3 OCA/server-backend Translate me on Weblate Try me on Runboat

+
+
+

Base External System OdooRPC

+

This module adds an external system adapter for connecting to another Odoo instance +using the Python odoorpc client (JSON-RPC).

+

It is built on top of base_external_system and implements a new adapter model:

+
    +
  • external.system.odoo (System Type: External System RPC)
  • +
+

The adapter supports:

+
    +
  • Validating required connection parameters (host, port, database, username, password)
  • +
  • Optional SSL transport (JSON-RPC over SSL)
  • +
  • A context-managed client lifecycle via the base_external_system adapter contract +(open client, perform calls, logout/cleanup)
  • +
+

Typical use cases include:

+
    +
  • Reading data from a legacy Odoo (e.g. Odoo 8/9/10) into a newer Odoo (e.g. Odoo 16)
  • +
  • Synchronizations, migrations, or import tools that must query remote models +(e.g. stock.production.lot, stock.move, res.partner) via RPC
  • +
+

Table of contents

+ +
+

Installation

+

This module requires the Python package odoorpc to be installed in the same +environment as your Odoo server.

+

Install it with pip, for example:

+
+pip install odoorpc
+
+

Then install the Odoo module in the Apps menu as usual.

+

If you run Odoo in Docker or another containerized setup, ensure the dependency +is present in the image that runs the Odoo server.

+
+
+

Configuration

+
    +
  1. Go to Settings → External Systems (menu provided by base_external_system).
  2. +
  3. Create a new record.
  4. +
  5. Set System Type to External System RPC (external.system.odoo).
  6. +
  7. Fill in the connection parameters:
      +
    • Host (e.g. odoo-test.odoo.org)
    • +
    • Port (e.g. 443 or 8069)
    • +
    • Database name
    • +
    • Username
    • +
    • Password
    • +
    • SSL toggle (if applicable)
    • +
    +
  8. +
  9. Save the record.
  10. +
+

After saving, the adapter interface record is created automatically by +base_external_system and is available via the interface field.

+
+
+

Usage

+

Test connection (UI)

+

Open an external system record configured with System Type External System RPC +and click the Test Connection button.

+

If successful, the adapter will report success (using the success mechanism +provided by base_external_system).

+

Using the client in code

+

Use the standard context manager from base_external_system:

+
+system = self.env.ref("your_module.external_system_odoo_remote")
+with system.client() as odoo:
+    partner_model = odoo.env["res.partner"]
+    ids = partner_model.search([("is_company", "=", True)], limit=10)
+    data = partner_model.read(ids, ["name"])
+
+

The yielded object is an odoorpc.ODOO client instance, so any remote model can be +accessed via odoo.env["model.name"].

+

Legacy helper (optional)

+

Some projects historically called a helper directly on the adapter record:

+
+odoo = system.interface._connect()
+
+

If your adapter keeps that helper for backward compatibility, it returns the same +client object as external_get_client().

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Therp BV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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-backend project on GitHub.

+

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

+
+
+
+
+ + diff --git a/base_external_system_odoorpc/tests/__init__.py b/base_external_system_odoorpc/tests/__init__.py new file mode 100644 index 000000000..ab2d037b6 --- /dev/null +++ b/base_external_system_odoorpc/tests/__init__.py @@ -0,0 +1 @@ +from . import test_odoorpc_adapter diff --git a/base_external_system_odoorpc/tests/test_odoorpc_adapter.py b/base_external_system_odoorpc/tests/test_odoorpc_adapter.py new file mode 100644 index 000000000..fb939cfcf --- /dev/null +++ b/base_external_system_odoorpc/tests/test_odoorpc_adapter.py @@ -0,0 +1,171 @@ +# pylint: disable=method-required-super +# Copyright 2026 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo.exceptions import UserError, ValidationError +from odoo.tests.common import TransactionCase + +from ..models import external_system_odoo as mod + + +class _FakeModel: + def __init__(self, name): + self._name = name + self.search_calls = [] + self.read_calls = [] + + def search(self, domain, limit=None, order=None): + self.search_calls.append((domain, limit, order)) + # Simulate "admin" found + return [1] + + def read(self, ids, fields=None): + self.read_calls.append((ids, fields)) + return [{"id": ids[0], "name": "Admin"}] + + +class _FakeEnv: + def __init__(self): + self._models = {} + + def __getitem__(self, model_name): + if model_name not in self._models: + self._models[model_name] = _FakeModel(model_name) + return self._models[model_name] + + +class _FakeODOOClient: + def __init__(self): + self.logged_in = False + self.logged_out = False + self.login_calls = [] + self.env = _FakeEnv() + + def login(self, db, username, password): + self.login_calls.append((db, username, password)) + # simulate successful login + self.logged_in = True + + def logout(self): + self.logged_out = True + + +class _FakeOdooRPCModule: + """Fake `odoorpc` module replacement with an ODOO constructor.""" + + def __init__(self): + self.created = [] + self.last_client = None + + def ODOO(self, host, port=None, protocol=None): + self.created.append((host, port, protocol)) + self.last_client = _FakeODOOClient() + return self.last_client + + +class TestBaseExternalSystemOdooRPC(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env(su=True) + + def _make_system(self, **overrides): + vals = { + "name": "Test system", + "system_type": "external.system.odoo", + "host": "test-test@odoo.test", + "port": 443, + "db_name": "testdatabase", + "username": "admin", + "password": "admin", + "is_ssl": True, + "company_ids": [(6, 0, [self.env.company.id])], + } + vals.update(overrides) + return self.env["external.system"].create(vals) + + def _patch_odoorpc(self): + """ + Patch the `odoorpc` module reference imported inside the adapter file. + Adapter file imports odoorpc at module import time, so we override that + module-level name with our fake. + """ + fake = _FakeOdooRPCModule() + mod.odoorpc = fake + return fake + + def test_interface(self): + sys = self._make_system() + self.assertTrue(sys.interface) + self.assertEqual( + sys.interface._name, + "external.system.odoo", + ) + self.assertEqual( + sys.interface.system_id.id, + sys.id, + ) + + def test_external_get_clien_ssl(self): + sys = self._make_system(is_ssl=True) + fake = self._patch_odoorpc() + client = sys.interface.external_get_client() + # constructor called with jsonrpc+ssl + self.assertEqual(fake.created[-1], (sys.host, sys.port, "jsonrpc+ssl")) + # login called + self.assertTrue(client.logged_in) + self.assertEqual( + client.login_calls[-1], + (sys.db_name, sys.username, sys.password), + ) + + def test_external_get_client_no_ssl(self): + sys = self._make_system(is_ssl=False) + fake = self._patch_odoorpc() + client = sys.interface.external_get_client() + self.assertEqual(fake.created[-1], (sys.host, sys.port, "jsonrpc")) + self.assertTrue(client.logged_in) + + def test_external_get_client_validationerror(self): + sys = self._make_system(db_name=False) + self._patch_odoorpc() + with self.assertRaises(ValidationError): + sys.interface.external_get_client() + + def test_client_context_manager(self): + sys = self._make_system() + fake = self._patch_odoorpc() + with sys.client() as client: + self.assertTrue(client.logged_in) + self.assertFalse(client.logged_out) + # after context, destroy_client should have logged out + self.assertTrue(fake.last_client.logged_out) + + def test_interface_connect(self): + sys = self._make_system() + fake = self._patch_odoorpc() + client = sys.interface._connect() + self.assertIs(client, fake.last_client) + self.assertTrue(client.logged_in) + + def test_external_test_connection(self): + """ + base_external_system's default external_test_connection raises UserError + with a success message. Our adapter should: + - open a client + - call res.users search/read probe + - then call super() which raises UserError + - and logout on exit + """ + sys = self._make_system() + fake = self._patch_odoorpc() + with self.assertRaises(UserError): + sys.interface.external_test_connection() + self.assertIsNotNone(fake.last_client) + users = fake.last_client.env["res.users"] + self.assertEqual(len(users.search_calls), 1) + self.assertEqual(users.search_calls[0][0], [("login", "=", "admin")]) + self.assertEqual(len(users.read_calls), 1) + self.assertEqual(users.read_calls[0][1], ["name"]) + # And should have logged out due to adapter.client() finally block + self.assertTrue(fake.last_client.logged_out) diff --git a/base_external_system_odoorpc/views/external_system_views.xml b/base_external_system_odoorpc/views/external_system_views.xml new file mode 100644 index 000000000..3e975d95c --- /dev/null +++ b/base_external_system_odoorpc/views/external_system_views.xml @@ -0,0 +1,27 @@ + + + + + external.system.form.odoo + external.system + + + + + + + + + {'invisible': [('system_type', '=', 'external.system.odoo')]} + + + + + + diff --git a/requirements.txt b/requirements.txt index 3ab5caba8..2d03dc956 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ # generated from manifests external_dependencies mysqlclient +odoorpc pymssql<=2.2.5 ; python_version <= '3.10' pymssql<=2.2.8 ; python_version > '3.10' sqlalchemy diff --git a/setup/base_external_system_odoorpc/odoo/addons/base_external_system_odoorpc b/setup/base_external_system_odoorpc/odoo/addons/base_external_system_odoorpc new file mode 120000 index 000000000..25933bf83 --- /dev/null +++ b/setup/base_external_system_odoorpc/odoo/addons/base_external_system_odoorpc @@ -0,0 +1 @@ +../../../../base_external_system_odoorpc \ No newline at end of file diff --git a/setup/base_external_system_odoorpc/setup.py b/setup/base_external_system_odoorpc/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/base_external_system_odoorpc/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)