v 9.0 v 10.0 v 11.0 v 12.0 Third Party 1659
Download for v 11.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 270
Technical Name module_auto_update
LicenseLGPL-3
Websitehttps://github.com/OCA/server-tools
Versions 13.0 10.0 9.0 11.0 12.0 14.0 15.0 16.0
You bought this module and need support? Click here!

Module Auto Update

Production/Stable License: LGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

This addon provides mechanisms to compute sha1 hashes of installed addons, and save them in the database. It also provides a method that exploits these mechanisms to update a database by upgrading only the modules for which the hash has changed since the last successful upgrade.

Table of contents

Configuration

This module supports the following system parameters:

  • module_auto_update.exclude_patterns: comma-separated list of file name patterns to ignore when computing addon checksums. Defaults to *.pyc,*.pyo,i18n/*.pot,i18n_extra/*.pot,static/*. Filename patterns must be compatible with the python fnmatch function.

In addition to the above pattern, .po files corresponding to languages that are not installed in the Odoo database are ignored when computing checksums.

Usage

The main method provided by this module is upgrade_changed_checksum on ir.module.module. It runs a database upgrade for all installed modules for which the hash has changed since the last successful run of this method. On success it saves the hashes in the database.

The first time this method is invoked after installing the module, it runs an upgrade of all modules, because it has not saved the hashes yet. This is by design, priviledging safety. Should this be an issue, the method _save_installed_checksums can be invoked in a situation where one is sure all modules on disk are installed and up-to-date in the database.

An easy way to invoke this upgrade mechanism is by issuing the following in an Odoo shell session:

env['ir.module.module'].upgrade_changed_checksum()

Known issues / Roadmap

  • Since version 2.0.0, some features have been deprecated. When you upgrade from previous versions, these features will be kept for backwards compatibility, but beware! They are buggy!

    If you install this addon from scratch, these features are disabled by default.

    To force enabling or disabling the deprecated features, set a configuration parameter called module_auto_update.enable_deprecated to either 1 or 0. It is recommended that you disable them.

    Keep in mind that from this version, all upgrades are assumed to run in a separate odoo instance, dedicated exclusively to upgrade Odoo.

  • When migrating the addon to new versions, the deprecated features should be removed. To make it simple all deprecated features are found in files suffixed with _deprecated.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • LasLabs
  • Juan José Scarafía
  • Tecnativa
  • ACSONE SA/NV

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

sbidoul

This module is part of the OCA/server-tools project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.