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.

121 lines
4.6 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. ==================
  2. Module Auto Update
  3. ==================
  4. .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  5. !! This file is generated by oca-gen-addon-readme !!
  6. !! changes will be overwritten. !!
  7. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  8. .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
  9. :target: https://odoo-community.org/page/development-status
  10. :alt: Production/Stable
  11. .. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
  12. :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
  13. :alt: License: LGPL-3
  14. .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
  15. :target: https://github.com/OCA/server-tools/tree/12.0/module_auto_update
  16. :alt: OCA/server-tools
  17. .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
  18. :target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-module_auto_update
  19. :alt: Translate me on Weblate
  20. .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
  21. :target: https://runbot.odoo-community.org/runbot/149/12.0
  22. :alt: Try me on Runbot
  23. |badge1| |badge2| |badge3| |badge4| |badge5|
  24. This addon provides mechanisms to compute sha1 hashes of installed addons,
  25. and save them in the database. It also provides a method that exploits these
  26. mechanisms to update a database by upgrading only the modules for which the
  27. hash has changed since the last successful upgrade.
  28. **Table of contents**
  29. .. contents::
  30. :local:
  31. Configuration
  32. =============
  33. This module supports the following system parameters:
  34. * ``module_auto_update.exclude_patterns``: comma-separated list of file
  35. name patterns to ignore when computing addon checksums. Defaults to
  36. ``*.pyc,*.pyo,i18n/*.pot,i18n_extra/*.pot,static/*``.
  37. Filename patterns must be compatible with the python ``fnmatch`` function.
  38. In addition to the above pattern, .po files corresponding to languages that
  39. are not installed in the Odoo database are ignored when computing checksums.
  40. Usage
  41. =====
  42. The main method provided by this module is ``upgrade_changed_checksum``
  43. on ``ir.module.module``. It runs a database upgrade for all installed
  44. modules for which the hash has changed since the last successful
  45. run of this method. On success it saves the hashes in the database.
  46. The first time this method is invoked after installing the module, it
  47. runs an upgrade of all modules, because it has not saved the hashes yet.
  48. This is by design, priviledging safety. Should this be an issue,
  49. the method ``_save_installed_checksums`` can be invoked in a situation
  50. where one is sure all modules on disk are installed and up-to-date in the
  51. database.
  52. To invoke the upgrade mechanism, navigate to *Apps* menu and use the
  53. *Auto-Upgrade Modules* button, available only in developer mode. Restarting
  54. the Odoo instance is highly recommended to minify risk of any possible issues.
  55. Another easy way to invoke this upgrade mechanism is by issuing the following
  56. in an Odoo shell session:
  57. .. code-block:: python
  58. env['ir.module.module'].upgrade_changed_checksum()
  59. Bug Tracker
  60. ===========
  61. Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
  62. In case of trouble, please check there if your issue has already been reported.
  63. If you spotted it first, help us smashing it by providing a detailed and welcomed
  64. `feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20module_auto_update%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  65. Do not contact contributors directly about support or help with technical issues.
  66. Credits
  67. =======
  68. Authors
  69. ~~~~~~~
  70. * LasLabs
  71. * Juan José Scarafía
  72. * Tecnativa
  73. * ACSONE SA/NV
  74. Contributors
  75. ~~~~~~~~~~~~
  76. * Brent Hughes <brent.hughes@laslabs.com>
  77. * Juan José Scarafía <jjs@adhoc.com.ar>
  78. * Jairo Llopis <jairo.llopis@tecnativa.com>
  79. * Stéphane Bidoul <stephane.bidoul@acsone.eu> (https://acsone.eu)
  80. Maintainers
  81. ~~~~~~~~~~~
  82. This module is maintained by the OCA.
  83. .. image:: https://odoo-community.org/logo.png
  84. :alt: Odoo Community Association
  85. :target: https://odoo-community.org
  86. OCA, or the Odoo Community Association, is a nonprofit organization whose
  87. mission is to support the collaborative development of Odoo features and
  88. promote its widespread use.
  89. This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/12.0/module_auto_update>`_ project on GitHub.
  90. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.