You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
3.9 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. .. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
  3. :alt: License: LGPL-3
  4. ==================
  5. Module Auto Update
  6. ==================
  7. This addon provides mechanisms to compute sha1 hashes of installed addons,
  8. and save them in the database. It also provides a method that exploits these
  9. mechanisms to update a database by upgrading only the modules for which the
  10. hash has changed since the last successful upgrade.
  11. Configuration
  12. =============
  13. This module supports the following system parameters:
  14. * ``module_auto_update.exclude_patterns``: comma-separated list of file
  15. name patterns to ignore when computing addon checksums. Defaults to
  16. ``*.pyc,*.pyo,i18n/*.pot,i18n_extra/*.pot,static/*``.
  17. Filename patterns must be compatible with the python ``fnmatch`` function.
  18. In addition to the above pattern, .po files corresponding to languages that
  19. are not installed in the Odoo database are ignored when computing checksums.
  20. Usage
  21. =====
  22. The main method provided by this module is ``upgrade_changed_checksum``
  23. on ``ir.module.module``. It runs a database upgrade for all installed
  24. modules for which the hash has changed since the last successful
  25. run of this method. On success it saves the hashes in the database.
  26. The first time this method is invoked after installing the module, it
  27. runs an upgrade of all modules, because it has not saved the hashes yet.
  28. This is by design, priviledging safety. Should this be an issue,
  29. the method ``_save_installed_checksums`` can be invoked in a situation
  30. where one is sure all modules on disk are installed and up-to-date in the
  31. database.
  32. An easy way to invoke this upgrade mechanism is by issuing the following
  33. in an Odoo shell session::
  34. env['ir.module.module'].upgrade_changed_checksum()
  35. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  36. :alt: Try me on Runbot
  37. :target: https://runbot.odoo-community.org/runbot/149/10.0
  38. Known issues / Roadmap
  39. ======================
  40. * Since version ``2.0.0``, some features have been deprecated.
  41. When you upgrade from previous versions, these features will be kept for
  42. backwards compatibility, but beware! They are buggy!
  43. If you install this addon from scratch, these features are disabled by
  44. default.
  45. To force enabling or disabling the deprecated features, set a configuration
  46. parameter called ``module_auto_update.enable_deprecated`` to either ``1``
  47. or ``0``. It is recommended that you disable them.
  48. Keep in mind that from this version, all upgrades are assumed to run in a
  49. separate odoo instance, dedicated exclusively to upgrade Odoo.
  50. * When migrating the addon to new versions, the deprecated features should be
  51. removed. To make it simple all deprecated features are found in files
  52. suffixed with ``_deprecated``.
  53. Bug Tracker
  54. ===========
  55. Bugs are tracked on `GitHub Issues
  56. <https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
  57. check there if your issue has already been reported. If you spotted it first,
  58. help us smash it by providing detailed and welcomed feedback.
  59. Credits
  60. =======
  61. Images
  62. ------
  63. * Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
  64. Contributors
  65. ------------
  66. * Brent Hughes <brent.hughes@laslabs.com>
  67. * Juan José Scarafía <jjs@adhoc.com.ar>
  68. * Jairo Llopis <jairo.llopis@tecnativa.com>
  69. * Stéphane Bidoul <stephane.bidoul@acsone.eu> (https://acsone.eu)
  70. Do not contact contributors directly about support or help with technical issues.
  71. Maintainer
  72. ----------
  73. .. image:: https://odoo-community.org/logo.png
  74. :alt: Odoo Community Association
  75. :target: https://odoo-community.org
  76. This module is maintained by the OCA.
  77. OCA, or the Odoo Community Association, is a nonprofit organization whose
  78. mission is to support the collaborative development of Odoo features and
  79. promote its widespread use.
  80. To contribute to this module, please visit https://odoo-community.org.