|
| 1 | +.. image:: https://odoo-community.org/readme-banner-image |
| 2 | + :target: https://odoo-community.org/get-involved?utm_source=readme |
| 3 | + :alt: Odoo Community Association |
| 4 | + |
| 5 | +=============================== |
| 6 | +Change auto installable modules |
| 7 | +=============================== |
| 8 | + |
| 9 | +.. |
| 10 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 11 | + !! This file is generated by oca-gen-addon-readme !! |
| 12 | + !! changes will be overwritten. !! |
| 13 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 14 | + !! source digest: sha256:162ad195483bc21079128fc8075e1cf29eba3e177cffd0fbfa8d42f28a27ceab |
| 15 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 16 | +
|
| 17 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 18 | + :target: https://odoo-community.org/page/development-status |
| 19 | + :alt: Beta |
| 20 | +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png |
| 21 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 22 | + :alt: License: AGPL-3 |
| 23 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github |
| 24 | + :target: https://github.com/OCA/server-tools/tree/19.0/module_change_auto_install |
| 25 | + :alt: OCA/server-tools |
| 26 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 27 | + :target: https://translation.odoo-community.org/projects/server-tools-19-0/server-tools-19-0-module_change_auto_install |
| 28 | + :alt: Translate me on Weblate |
| 29 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 30 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=19.0 |
| 31 | + :alt: Try me on Runboat |
| 32 | + |
| 33 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 34 | + |
| 35 | +In odoo, by default some modules are marked as auto installable by the |
| 36 | +``auto_install`` key present in the manifest. |
| 37 | + |
| 38 | +- This feature is very useful for "glue" modules that allow two modules |
| 39 | + to work together. (A typical example is ``sale_stock`` which allows |
| 40 | + ``sale`` and ``stock`` modules to work together). |
| 41 | +- However, Odoo SA also marks some modules as auto installable, even |
| 42 | + though this is not technically required. This can happen for modules |
| 43 | + the company wants to promote like ``iap``, modules with a big wow |
| 44 | + effect like ``partner_autocomplete``, or some modules they consider |
| 45 | + useful by default like ``account_edi``. See the discussion: |
| 46 | + https://github.com/odoo/odoo/issues/71190 |
| 47 | + |
| 48 | +This module allows to change by configuration, the list of auto |
| 49 | +installable modules, adding or removing some modules to auto install. |
| 50 | + |
| 51 | +**Table of contents** |
| 52 | + |
| 53 | +.. contents:: |
| 54 | + :local: |
| 55 | + |
| 56 | +Installation |
| 57 | +============ |
| 58 | + |
| 59 | +You don't have to install this module. To make the features working : |
| 60 | + |
| 61 | +- make the module ``module_change_auto_install`` available in your |
| 62 | + addons path |
| 63 | +- either update your ``odoo.cfg`` or set the environment variables |
| 64 | + following the "Configure" section |
| 65 | + |
| 66 | +Configuration |
| 67 | +============= |
| 68 | + |
| 69 | +- Edit your ``odoo.cfg`` configuration file: |
| 70 | +- Add the module ``module_change_auto_install`` in the |
| 71 | + ``server_wide_modules`` list. |
| 72 | +- (optional) Add a new entry ``modules_disabled`` beneath a new section |
| 73 | + ``[module_change_auto_install]`` to mark a list of modules as NOT |
| 74 | + auto installable. The environment variable |
| 75 | + ``ODOO_MODULES_AUTO_INSTALL_DISABLED`` can also be set. |
| 76 | +- (optional) Add a new entry ``modules_enabled`` beneath a new section |
| 77 | + ``[module_change_auto_install]`` to mark a list of modules as auto |
| 78 | + installable. This feature can be usefull for companies that are |
| 79 | + hosting a lot of Odoo instances for many customers, and want some |
| 80 | + modules to be always installed. The environment variable |
| 81 | + ``ODOO_MODULES_AUTO_INSTALL_ENABLED`` can also be set. |
| 82 | + |
| 83 | +The values in the configuration file takes precedence over the |
| 84 | +environment variable values. |
| 85 | + |
| 86 | +**Typical Settings** |
| 87 | + |
| 88 | +.. code:: cfg |
| 89 | +
|
| 90 | + server_wide_modules = web,module_change_auto_install |
| 91 | +
|
| 92 | + [module_change_auto_install] |
| 93 | + modules_disabled = |
| 94 | + partner_autocomplete, |
| 95 | + iap, |
| 96 | + mail_bot |
| 97 | +
|
| 98 | + modules_enabled = |
| 99 | + web_responsive:web, |
| 100 | + base_technical_features, |
| 101 | + disable_odoo_online, |
| 102 | + account_usability |
| 103 | +
|
| 104 | +When using environment variables, the same configuration is: |
| 105 | + |
| 106 | +.. code:: shell |
| 107 | +
|
| 108 | + export ODOO_MODULES_AUTO_INSTALL_DISABLED=partner_autocomplete,iap,mail_bot |
| 109 | + export ODOO_MODULES_AUTO_INSTALL_ENABLED=web_responsive:web,base_technical_features,disable_odoo_online,account_usability |
| 110 | +
|
| 111 | +Run your instance and check logs. Modules that has been altered should |
| 112 | +be present in your log, at the load of your instance: |
| 113 | + |
| 114 | +.. code:: shell |
| 115 | +
|
| 116 | + INFO db_name odoo.addons.module_change_auto_install.patch: Module 'iap' has been marked as NOT auto installable. |
| 117 | + INFO db_name odoo.addons.module_change_auto_install.patch: Module 'mail_bot' has been marked as NOT auto installable. |
| 118 | + INFO db_name odoo.addons.module_change_auto_install.patch: Module 'partner_autocomplete' has been marked as NOT auto installable. |
| 119 | + INFO db_name odoo.modules.loading: 42 modules loaded in 0.32s, 0 queries (+0 extra) |
| 120 | +
|
| 121 | +**Advanced Configuration Possibilities** |
| 122 | + |
| 123 | +if your ``odoo.cfg`` file contains the following configuration: |
| 124 | + |
| 125 | +.. code:: cfg |
| 126 | +
|
| 127 | + [module_change_auto_install] |
| 128 | + modules_enabled = |
| 129 | + account_usability, |
| 130 | + web_responsive:web, |
| 131 | + base_technical_features:, |
| 132 | + point_of_sale:sale/purchase |
| 133 | +
|
| 134 | +The behaviour will be the following: |
| 135 | + |
| 136 | +- ``account_usability`` module will be installed as soon as all the |
| 137 | + default dependencies are installed. (here ``account``) |
| 138 | +- ``web_responsive`` module will be installed as soon as ``web`` is |
| 139 | + installed. (Althought ``web_responsive`` depends on ``web`` and |
| 140 | + ``mail``) |
| 141 | +- ``base_technical_features`` will be ALWAYS installed |
| 142 | +- ``point_of_sale`` module will be installed as soon as ``sale`` and |
| 143 | + ``purchase`` module are installed. |
| 144 | + |
| 145 | +When using environment variables, the same configuration is: |
| 146 | + |
| 147 | +.. code:: shell |
| 148 | +
|
| 149 | + export ODOO_MODULES_AUTO_INSTALL_ENABLED=account_usability,web_responsive:web,base_technical_features:,point_of_sale:sale/purchase |
| 150 | +
|
| 151 | +Development |
| 152 | +=========== |
| 153 | + |
| 154 | +If you upgrade your odoo Instance from a major version to another, using |
| 155 | +the OCA Free Software project "OpenUpgrade", you can also use this |
| 156 | +module during the upgrade process, to avoid the installation of useless |
| 157 | +new modules. |
| 158 | + |
| 159 | +Bug Tracker |
| 160 | +=========== |
| 161 | + |
| 162 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. |
| 163 | +In case of trouble, please check there if your issue has already been reported. |
| 164 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 165 | +`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20module_change_auto_install%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 166 | + |
| 167 | +Do not contact contributors directly about support or help with technical issues. |
| 168 | + |
| 169 | +Credits |
| 170 | +======= |
| 171 | + |
| 172 | +Authors |
| 173 | +------- |
| 174 | + |
| 175 | +* GRAP |
| 176 | + |
| 177 | +Contributors |
| 178 | +------------ |
| 179 | + |
| 180 | +- Sylvain LE GAL <https://twitter.com/legalsylvain> |
| 181 | + |
| 182 | +- XCG Consulting, part of `Orbeet <https://orbeet.io/>`__: |
| 183 | + |
| 184 | + - Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr> |
| 185 | + |
| 186 | +Maintainers |
| 187 | +----------- |
| 188 | + |
| 189 | +This module is maintained by the OCA. |
| 190 | + |
| 191 | +.. image:: https://odoo-community.org/logo.png |
| 192 | + :alt: Odoo Community Association |
| 193 | + :target: https://odoo-community.org |
| 194 | + |
| 195 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 196 | +mission is to support the collaborative development of Odoo features and |
| 197 | +promote its widespread use. |
| 198 | + |
| 199 | +.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px |
| 200 | + :target: https://github.com/legalsylvain |
| 201 | + :alt: legalsylvain |
| 202 | + |
| 203 | +Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: |
| 204 | + |
| 205 | +|maintainer-legalsylvain| |
| 206 | + |
| 207 | +This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/19.0/module_change_auto_install>`_ project on GitHub. |
| 208 | + |
| 209 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments