|
| 1 | +==================== |
| 2 | +Base External System |
| 3 | +==================== |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:538c9c995cdcc3f95d664975e426c7a54638c5a728cef8253014ef178d29ec3f |
| 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%2Fserver--backend-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/server-backend/tree/18.0/base_external_system |
| 21 | + :alt: OCA/server-backend |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/server-backend-18-0/server-backend-18-0-base_external_system |
| 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/server-backend&target_branch=18.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +This module provides an interface/adapter mechanism for the definition |
| 32 | +of remote systems. |
| 33 | + |
| 34 | +Note that this module stores everything in plain text. In the interest |
| 35 | +of security, it is recommended you use another module (such as keychain |
| 36 | +or red_october to encrypt things like the password and private key). |
| 37 | +This is not done here in order to not force a specific security method. |
| 38 | + |
| 39 | +**Table of contents** |
| 40 | + |
| 41 | +.. contents:: |
| 42 | + :local: |
| 43 | + |
| 44 | +Configuration |
| 45 | +============= |
| 46 | + |
| 47 | +Configure external systems in Settings => Technical => External Systems |
| 48 | + |
| 49 | +Usage |
| 50 | +===== |
| 51 | + |
| 52 | +The credentials for systems are stored in the ``external.system`` model, |
| 53 | +and are to be configured by the user. This model is the unified |
| 54 | +interface for the underlying adapters. |
| 55 | + |
| 56 | +Using the Interface |
| 57 | +------------------- |
| 58 | + |
| 59 | +Given an ``external.system`` singleton called ``external_system``, you |
| 60 | +would do the following to get the underlying system client: |
| 61 | + |
| 62 | +.. code:: python |
| 63 | +
|
| 64 | + with external_system.client() as client: |
| 65 | + client.do_something() |
| 66 | +
|
| 67 | +The client will be destroyed once the context has completed. Destruction |
| 68 | +takes place in the adapter's ``external_destroy_client`` method. |
| 69 | + |
| 70 | +The only unified aspect of this interface is the client connection |
| 71 | +itself. Other more opinionated interface/adapter mechanisms can be |
| 72 | +implemented in other modules, such as the file system interface in |
| 73 | +`OCA/server-tools/external_file_location <https://github.com/OCA/server-tools/tree/9.0/external_file_location>`__. |
| 74 | + |
| 75 | +Creating an Adapter |
| 76 | +------------------- |
| 77 | + |
| 78 | +Modules looking to add an external system adapter should inherit the |
| 79 | +``external.system.adapter`` model and override the following methods: |
| 80 | + |
| 81 | +- ``external_get_client``: Returns a usable client for the system |
| 82 | +- ``external_destroy_client``: Destroy the connection, if applicable. |
| 83 | + Does not need to be defined if the connection destroys itself. |
| 84 | + |
| 85 | +Bug Tracker |
| 86 | +=========== |
| 87 | + |
| 88 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/issues>`_. |
| 89 | +In case of trouble, please check there if your issue has already been reported. |
| 90 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 91 | +`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20base_external_system%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 92 | + |
| 93 | +Do not contact contributors directly about support or help with technical issues. |
| 94 | + |
| 95 | +Credits |
| 96 | +======= |
| 97 | + |
| 98 | +Authors |
| 99 | +------- |
| 100 | + |
| 101 | +* LasLabs |
| 102 | + |
| 103 | +Contributors |
| 104 | +------------ |
| 105 | + |
| 106 | +- Dave Lasley <dave@laslabs.com> |
| 107 | +- Ronald Portier <ronald@therp.nl> |
| 108 | +- `Tecnativa <https://www.tecnativa.com>`__: |
| 109 | + |
| 110 | + - Alexandre Díaz |
| 111 | + - César A. Sánchez |
| 112 | + |
| 113 | +Maintainers |
| 114 | +----------- |
| 115 | + |
| 116 | +This module is maintained by the OCA. |
| 117 | + |
| 118 | +.. image:: https://odoo-community.org/logo.png |
| 119 | + :alt: Odoo Community Association |
| 120 | + :target: https://odoo-community.org |
| 121 | + |
| 122 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 123 | +mission is to support the collaborative development of Odoo features and |
| 124 | +promote its widespread use. |
| 125 | + |
| 126 | +This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/18.0/base_external_system>`_ project on GitHub. |
| 127 | + |
| 128 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments