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.

90 lines
3.1 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/8.0
  38. Bug Tracker
  39. ===========
  40. Bugs are tracked on `GitHub Issues
  41. <https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
  42. check there if your issue has already been reported. If you spotted it first,
  43. help us smash it by providing detailed and welcomed feedback.
  44. Credits
  45. =======
  46. Images
  47. ------
  48. * Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
  49. Contributors
  50. ------------
  51. * Brent Hughes <brent.hughes@laslabs.com>
  52. * Juan José Scarafía <jjs@adhoc.com.ar>
  53. * Jairo Llopis <jairo.llopis@tecnativa.com>
  54. * Stéphane Bidoul <stephane.bidoul@acsone.eu> (https://acsone.eu)
  55. Do not contact contributors directly about support or help with technical issues.
  56. Maintainer
  57. ----------
  58. .. image:: https://odoo-community.org/logo.png
  59. :alt: Odoo Community Association
  60. :target: https://odoo-community.org
  61. This module is maintained by the OCA.
  62. OCA, or the Odoo Community Association, is a nonprofit organization whose
  63. mission is to support the collaborative development of Odoo features and
  64. promote its widespread use.
  65. To contribute to this module, please visit https://odoo-community.org.