From 4ecd42a13c9553df41f8788fd5c9506835e3dd1e Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 15 Jul 2022 09:17:13 +0000 Subject: [PATCH 01/25] README.rst --- module_auto_update/README.rst | 123 +++++ module_auto_update/__init__.py | 4 + module_auto_update/__manifest__.py | 22 + module_auto_update/addon_hash.py | 44 ++ module_auto_update/hooks.py | 11 + module_auto_update/i18n/ca.po | 50 ++ module_auto_update/i18n/cs_CZ.po | 75 +++ module_auto_update/i18n/de.po | 57 +++ module_auto_update/i18n/es.po | 63 +++ module_auto_update/i18n/es_MX.po | 51 ++ module_auto_update/i18n/fr.po | 75 +++ module_auto_update/i18n/hr.po | 51 ++ module_auto_update/i18n/it.po | 51 ++ .../i18n/module_auto_update.pot | 39 ++ module_auto_update/i18n/nl_NL.po | 51 ++ module_auto_update/i18n/pt_BR.po | 52 ++ module_auto_update/i18n/sl.po | 51 ++ module_auto_update/i18n/tr.po | 50 ++ module_auto_update/i18n/zh_CN.po | 48 ++ module_auto_update/models/__init__.py | 3 + module_auto_update/models/module.py | 198 ++++++++ module_auto_update/readme/CONFIGURE.rst | 9 + module_auto_update/readme/CONTRIBUTORS.rst | 6 + module_auto_update/readme/DESCRIPTION.rst | 4 + module_auto_update/readme/USAGE.rst | 22 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 465 ++++++++++++++++++ module_auto_update/tests/__init__.py | 4 + .../tests/sample_module/README.rst | 1 + .../tests/sample_module/data/f1.xml | 1 + .../tests/sample_module/data/f2.xml | 1 + .../tests/sample_module/i18n/en.po | 0 .../tests/sample_module/i18n/en_US.po | 0 .../tests/sample_module/i18n/fr.po | 0 .../tests/sample_module/i18n/fr_BE.po | 0 .../tests/sample_module/i18n/test.pot | 0 .../tests/sample_module/i18n_extra/en.po | 0 .../tests/sample_module/i18n_extra/fr.po | 0 .../tests/sample_module/i18n_extra/nl_NL.po | 0 .../tests/sample_module/models/stuff.py | 1 + .../tests/sample_module/models/stuff.pyc | Bin 0 -> 109 bytes .../tests/sample_module/models/stuff.pyo | Bin 0 -> 109 bytes .../tests/sample_module/static/src/some.js | 1 + module_auto_update/tests/test_addon_hash.py | 76 +++ module_auto_update/tests/test_module.py | 233 +++++++++ module_auto_update/views/ir_module_module.xml | 24 + 46 files changed, 2017 insertions(+) create mode 100644 module_auto_update/README.rst create mode 100644 module_auto_update/__init__.py create mode 100644 module_auto_update/__manifest__.py create mode 100644 module_auto_update/addon_hash.py create mode 100644 module_auto_update/hooks.py create mode 100644 module_auto_update/i18n/ca.po create mode 100644 module_auto_update/i18n/cs_CZ.po create mode 100644 module_auto_update/i18n/de.po create mode 100644 module_auto_update/i18n/es.po create mode 100644 module_auto_update/i18n/es_MX.po create mode 100644 module_auto_update/i18n/fr.po create mode 100644 module_auto_update/i18n/hr.po create mode 100644 module_auto_update/i18n/it.po create mode 100644 module_auto_update/i18n/module_auto_update.pot create mode 100644 module_auto_update/i18n/nl_NL.po create mode 100644 module_auto_update/i18n/pt_BR.po create mode 100644 module_auto_update/i18n/sl.po create mode 100644 module_auto_update/i18n/tr.po create mode 100644 module_auto_update/i18n/zh_CN.po create mode 100644 module_auto_update/models/__init__.py create mode 100644 module_auto_update/models/module.py create mode 100644 module_auto_update/readme/CONFIGURE.rst create mode 100644 module_auto_update/readme/CONTRIBUTORS.rst create mode 100644 module_auto_update/readme/DESCRIPTION.rst create mode 100644 module_auto_update/readme/USAGE.rst create mode 100644 module_auto_update/static/description/icon.png create mode 100644 module_auto_update/static/description/index.html create mode 100644 module_auto_update/tests/__init__.py create mode 100644 module_auto_update/tests/sample_module/README.rst create mode 100644 module_auto_update/tests/sample_module/data/f1.xml create mode 100644 module_auto_update/tests/sample_module/data/f2.xml create mode 100644 module_auto_update/tests/sample_module/i18n/en.po create mode 100644 module_auto_update/tests/sample_module/i18n/en_US.po create mode 100644 module_auto_update/tests/sample_module/i18n/fr.po create mode 100644 module_auto_update/tests/sample_module/i18n/fr_BE.po create mode 100644 module_auto_update/tests/sample_module/i18n/test.pot create mode 100644 module_auto_update/tests/sample_module/i18n_extra/en.po create mode 100644 module_auto_update/tests/sample_module/i18n_extra/fr.po create mode 100644 module_auto_update/tests/sample_module/i18n_extra/nl_NL.po create mode 100644 module_auto_update/tests/sample_module/models/stuff.py create mode 100644 module_auto_update/tests/sample_module/models/stuff.pyc create mode 100644 module_auto_update/tests/sample_module/models/stuff.pyo create mode 100644 module_auto_update/tests/sample_module/static/src/some.js create mode 100644 module_auto_update/tests/test_addon_hash.py create mode 100644 module_auto_update/tests/test_module.py create mode 100644 module_auto_update/views/ir_module_module.xml diff --git a/module_auto_update/README.rst b/module_auto_update/README.rst new file mode 100644 index 00000000000..809901e1833 --- /dev/null +++ b/module_auto_update/README.rst @@ -0,0 +1,123 @@ +================== +Module Auto Update +================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github + :target: https://github.com/OCA/server-tools/tree/15.0/module_auto_update + :alt: OCA/server-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-module_auto_update + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/149/15.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +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** + +.. contents:: + :local: + +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. + +To invoke the upgrade mechanism, navigate to *Apps* menu and use the +*Auto-Upgrade Modules* button, available only in developer mode. Restarting +the Odoo instance is highly recommended to minify risk of any possible issues. + +Another easy way to invoke this upgrade mechanism is by issuing the following +in an Odoo shell session: + +.. code-block:: python + + env['ir.module.module'].upgrade_changed_checksum() + +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 smashing 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 +~~~~~~~~~~~~ + +* Brent Hughes +* Juan José Scarafía +* Jairo Llopis +* Stéphane Bidoul (https://acsone.eu) +* Eric Antones +* Manuel Engel + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +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. diff --git a/module_auto_update/__init__.py b/module_auto_update/__init__.py new file mode 100644 index 00000000000..c5d48b349d3 --- /dev/null +++ b/module_auto_update/__init__.py @@ -0,0 +1,4 @@ +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from . import models +from .hooks import uninstall_hook diff --git a/module_auto_update/__manifest__.py b/module_auto_update/__manifest__.py new file mode 100644 index 00000000000..37b2f791598 --- /dev/null +++ b/module_auto_update/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2017 LasLabs Inc. +# Copyright 2018 Brainbean Apps (https://brainbeanapps.com) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +{ + "name": "Module Auto Update", + "summary": "Automatically update Odoo modules", + "version": "15.0.1.0.0", + "category": "Extra Tools", + "website": "https://github.com/OCA/server-tools", + "author": "LasLabs, " + "Juan José Scarafía, " + "Tecnativa, " + "ACSONE SA/NV, " + "Odoo Community Association (OCA)", + "license": "LGPL-3", + "installable": True, + "uninstall_hook": "uninstall_hook", + "depends": ["base"], + "data": ["views/ir_module_module.xml"], + "development_status": "Production/Stable", +} diff --git a/module_auto_update/addon_hash.py b/module_auto_update/addon_hash.py new file mode 100644 index 00000000000..4027bcd8971 --- /dev/null +++ b/module_auto_update/addon_hash.py @@ -0,0 +1,44 @@ +# Copyright 2018 ACSONE SA/NV. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +import hashlib +import os +from fnmatch import fnmatch + + +def _fnmatch(filename, patterns): + for pattern in patterns: + if fnmatch(filename, pattern): + return True + return False + + +def _walk(top, exclude_patterns, keep_langs): + keep_langs = {language.split("_")[0] for language in keep_langs} + for dirpath, dirnames, filenames in os.walk(top): + dirnames.sort() + reldir = os.path.relpath(dirpath, top) + if reldir == ".": + reldir = "" + for filename in sorted(filenames): + filepath = os.path.join(reldir, filename) + if _fnmatch(filepath, exclude_patterns): + continue + if keep_langs and reldir in {"i18n", "i18n_extra"}: + basename, ext = os.path.splitext(filename) + if ext == ".po": + if basename.split("_")[0] not in keep_langs: + continue + yield filepath + + +def addon_hash(top, exclude_patterns, keep_langs): + """Compute a sha1 digest of file contents.""" + m = hashlib.sha1() + for filepath in _walk(top, exclude_patterns, keep_langs): + # hash filename so empty files influence the hash + m.update(filepath.encode("utf-8")) + # hash file content + with open(os.path.join(top, filepath), "rb") as f: + m.update(f.read()) + return m.hexdigest() diff --git a/module_auto_update/hooks.py b/module_auto_update/hooks.py new file mode 100644 index 00000000000..08e06ed8fdd --- /dev/null +++ b/module_auto_update/hooks.py @@ -0,0 +1,11 @@ +# Copyright 2017 LasLabs Inc. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo import SUPERUSER_ID, api + +from .models.module import PARAM_INSTALLED_CHECKSUMS + + +def uninstall_hook(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) + env["ir.config_parameter"].set_param(PARAM_INSTALLED_CHECKSUMS, False) diff --git a/module_auto_update/i18n/ca.po b/module_auto_update/i18n/ca.po new file mode 100644 index 00000000000..4632861512d --- /dev/null +++ b/module_auto_update/i18n/ca.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-21 02:43+0000\n" +"PO-Revision-Date: 2017-07-21 02:43+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Mòdul" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/cs_CZ.po b/module_auto_update/i18n/cs_CZ.po new file mode 100644 index 00000000000..551f1b61bd9 --- /dev/null +++ b/module_auto_update/i18n/cs_CZ.po @@ -0,0 +1,75 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# Lukáš Spurný , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-03 10:08+0000\n" +"PO-Revision-Date: 2018-03-03 10:08+0000\n" +"Last-Translator: Lukáš Spurný , 2018\n" +"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/" +"teams/23907/cs_CZ/)\n" +"Language: cs_CZ\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Modul" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" + +#~ msgid "Checksum Dir" +#~ msgstr "Kontrolní součet Dir" + +#~ msgid "Checksum Installed" +#~ msgstr "Kontrolní součet je nainstalován" + +#~ msgid "Module Upgrade" +#~ msgstr "Aktualizace modulů" + +#~ msgid "Perform Module Upgrades" +#~ msgstr "Provést aktualizaci modulů" + +#~ msgid "Modules" +#~ msgstr "Moduly" + +#~ msgid "Open Updates and Update Apps List Server Action" +#~ msgstr "Otevřít aktualizaci a aktualizovat seznam serverových akcí" + +#~ msgid "Scheduled Upgrades" +#~ msgstr "Plánované aktualizace" + +#~ msgid "Updates" +#~ msgstr "Aktualizace" diff --git a/module_auto_update/i18n/de.po b/module_auto_update/i18n/de.po new file mode 100644 index 00000000000..d873fedecca --- /dev/null +++ b/module_auto_update/i18n/de.po @@ -0,0 +1,57 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# Niki Waibel , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-21 02:43+0000\n" +"PO-Revision-Date: 2017-07-21 02:43+0000\n" +"Last-Translator: Niki Waibel , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Modul" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" + +#~ msgid "Module Upgrade" +#~ msgstr "Modul aktualisieren" + +#, fuzzy +#~ msgid "Perform Module Upgrades" +#~ msgstr "Modul aktualisieren" diff --git a/module_auto_update/i18n/es.po b/module_auto_update/i18n/es.po new file mode 100644 index 00000000000..3be21985596 --- /dev/null +++ b/module_auto_update/i18n/es.po @@ -0,0 +1,63 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# OCA Transbot , 2018 +# enjolras , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-03 10:08+0000\n" +"PO-Revision-Date: 2018-03-03 10:08+0000\n" +"Last-Translator: enjolras , 2018\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Módulo" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" + +#~ msgid "Module Upgrade" +#~ msgstr "Actualización de módulo" + +#~ msgid "Modules" +#~ msgstr "Módulos" + +#~ msgid "Scheduled Upgrades" +#~ msgstr "Actualizaciones programadas" + +#~ msgid "Updates" +#~ msgstr "Actualizaciones" diff --git a/module_auto_update/i18n/es_MX.po b/module_auto_update/i18n/es_MX.po new file mode 100644 index 00000000000..d21bad0841f --- /dev/null +++ b/module_auto_update/i18n/es_MX.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-21 02:43+0000\n" +"PO-Revision-Date: 2017-07-21 02:43+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/" +"es_MX/)\n" +"Language: es_MX\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Módulo" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/fr.po b/module_auto_update/i18n/fr.po new file mode 100644 index 00000000000..319447d33e1 --- /dev/null +++ b/module_auto_update/i18n/fr.po @@ -0,0 +1,75 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# Nicolas JEUDY , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-03 10:08+0000\n" +"PO-Revision-Date: 2021-05-14 19:47+0000\n" +"Last-Translator: Yves Le Doeuff \n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "Mise à jour automatique des modules" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Module" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "Recherche intelligente" + +#~ msgid "Checksum Dir" +#~ msgstr "Somme de contrôle du dossier" + +#~ msgid "Checksum Installed" +#~ msgstr "Somme de contrôle installée" + +#~ msgid "Module Upgrade" +#~ msgstr "Mise à niveau du module" + +#~ msgid "Perform Module Upgrades" +#~ msgstr "Appliquer les mise à jour de modules" + +#~ msgid "Modules" +#~ msgstr "Modules" + +#~ msgid "Open Updates and Update Apps List Server Action" +#~ msgstr "Afficher les mises à jour" + +#~ msgid "Scheduled Upgrades" +#~ msgstr "Planifier les mises à jour" + +#~ msgid "Updates" +#~ msgstr "Mises à jour" diff --git a/module_auto_update/i18n/hr.po b/module_auto_update/i18n/hr.po new file mode 100644 index 00000000000..044265934f9 --- /dev/null +++ b/module_auto_update/i18n/hr.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-21 02:43+0000\n" +"PO-Revision-Date: 2017-07-21 02:43+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Modul" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/it.po b/module_auto_update/i18n/it.po new file mode 100644 index 00000000000..bdf31c43ce2 --- /dev/null +++ b/module_auto_update/i18n/it.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-21 02:43+0000\n" +"PO-Revision-Date: 2021-11-29 11:45+0000\n" +"Last-Translator: Francesco Foresti \n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "Aggiorna Moduli Automaticamente" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "Nome da visualizzare" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "ID" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Modulo" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "Ricerca Smart" diff --git a/module_auto_update/i18n/module_auto_update.pot b/module_auto_update/i18n/module_auto_update.pot new file mode 100644 index 00000000000..3246fc0670f --- /dev/null +++ b/module_auto_update/i18n/module_auto_update.pot @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "" + +#. module: module_auto_update +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." +msgstr "" diff --git a/module_auto_update/i18n/nl_NL.po b/module_auto_update/i18n/nl_NL.po new file mode 100644 index 00000000000..478f0b30c4d --- /dev/null +++ b/module_auto_update/i18n/nl_NL.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-21 02:43+0000\n" +"PO-Revision-Date: 2017-07-21 02:43+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Module" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/pt_BR.po b/module_auto_update/i18n/pt_BR.po new file mode 100644 index 00000000000..65aa4916df1 --- /dev/null +++ b/module_auto_update/i18n/pt_BR.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-21 02:43+0000\n" +"PO-Revision-Date: 2019-08-30 14:37+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.8\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "Módulos de atualização automática" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Módulo" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/sl.po b/module_auto_update/i18n/sl.po new file mode 100644 index 00000000000..ab41d6aee67 --- /dev/null +++ b/module_auto_update/i18n/sl.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-21 02:43+0000\n" +"PO-Revision-Date: 2017-07-21 02:43+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Modul" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/tr.po b/module_auto_update/i18n/tr.po new file mode 100644 index 00000000000..21e79edb78d --- /dev/null +++ b/module_auto_update/i18n/tr.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-21 02:43+0000\n" +"PO-Revision-Date: 2017-07-21 02:43+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "Modül" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/zh_CN.po b/module_auto_update/i18n/zh_CN.po new file mode 100644 index 00000000000..3225e30d930 --- /dev/null +++ b/module_auto_update/i18n/zh_CN.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-08-31 06:18+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.8\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "自动升级模块" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name +msgid "Display Name" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id +msgid "ID" +msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update +msgid "Last Modified on" +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "模块" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/models/__init__.py b/module_auto_update/models/__init__.py new file mode 100644 index 00000000000..99672cfeb84 --- /dev/null +++ b/module_auto_update/models/__init__.py @@ -0,0 +1,3 @@ +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from . import module diff --git a/module_auto_update/models/module.py b/module_auto_update/models/module.py new file mode 100644 index 00000000000..b50bf1ccd70 --- /dev/null +++ b/module_auto_update/models/module.py @@ -0,0 +1,198 @@ +# Copyright 2017 LasLabs Inc. +# Copyright 2018 ACSONE SA/NV. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +import json +import logging +import os + +from odoo import _, api, exceptions, models, tools +from odoo.modules.module import get_module_path + +from ..addon_hash import addon_hash + +PARAM_INSTALLED_CHECKSUMS = "module_auto_update.installed_checksums" +PARAM_EXCLUDE_PATTERNS = "module_auto_update.exclude_patterns" +DEFAULT_EXCLUDE_PATTERNS = "*.pyc,*.pyo,i18n/*.pot,i18n_extra/*.pot,static/*" + +_logger = logging.getLogger(__name__) + + +class FailedUpgradeError(exceptions.UserError): + pass + + +class IncompleteUpgradeError(exceptions.UserError): + pass + + +def ensure_module_state(env, modules, state): + # read module states, bypassing any Odoo cache + if not modules: + return + env.cr.execute( + "SELECT name FROM ir_module_module " "WHERE id IN %s AND state != %s", + (tuple(modules.ids), state), + ) + names = [r[0] for r in env.cr.fetchall()] + if names: + raise FailedUpgradeError( + "The following modules should be in state '%s' " + "at this stage: %s. Bailing out for safety." + % ( + state, + ",".join(names), + ), + ) + + +class Module(models.Model): + _inherit = "ir.module.module" + + def _get_checksum_dir(self): + self.ensure_one() + + exclude_patterns = self.env["ir.config_parameter"].get_param( + PARAM_EXCLUDE_PATTERNS, + DEFAULT_EXCLUDE_PATTERNS, + ) + exclude_patterns = [p.strip() for p in exclude_patterns.split(",")] + keep_langs = self.env["res.lang"].search([]).mapped("code") + + module_path = get_module_path(self.name) + if module_path and os.path.isdir(module_path): + checksum_dir = addon_hash( + module_path, + exclude_patterns, + keep_langs, + ) + else: + checksum_dir = False + + return checksum_dir + + @api.model + def _get_saved_checksums(self): + Icp = self.env["ir.config_parameter"] + return json.loads(Icp.get_param(PARAM_INSTALLED_CHECKSUMS, "{}")) + + @api.model + def _save_checksums(self, checksums): + Icp = self.env["ir.config_parameter"] + Icp.set_param(PARAM_INSTALLED_CHECKSUMS, json.dumps(checksums)) + Icp.flush() + + @api.model + def _save_installed_checksums(self): + checksums = {} + installed_modules = self.search([("state", "=", "installed")]) + for module in installed_modules: + checksums[module.name] = module._get_checksum_dir() + self._save_checksums(checksums) + + @api.model + def _get_modules_partially_installed(self): + return self.search([("state", "in", ("to install", "to remove", "to upgrade"))]) + + @api.model + def _get_modules_with_changed_checksum(self): + saved_checksums = self._get_saved_checksums() + installed_modules = self.search([("state", "=", "installed")]) + return installed_modules.filtered( + lambda r: r._get_checksum_dir() != saved_checksums.get(r.name), + ) + + @api.model + def upgrade_changed_checksum(self, overwrite_existing_translations=False): + """Run an upgrade of the database, upgrading only changed modules. + + Installed modules for which the checksum has changed since the + last successful run of this method are marked "to upgrade", + then the normal Odoo scheduled upgrade process + is launched. + + If there is no module with a changed checksum, and no module in state + other than installed, uninstalled, uninstallable, this method does + nothing, otherwise the normal Odoo upgrade process is launched. + + After a successful upgrade, the checksums of installed modules are + saved. + + In case of error during the upgrade, an exception is raised. + If any module remains to upgrade or to uninstall after the upgrade + process, an exception is raised as well. + + Note: this method commits the current transaction at each important + step, it is therefore not intended to be run as part of a + larger transaction. + """ + _logger.info( + "Checksum upgrade starting (i18n-overwrite=%s)...", + overwrite_existing_translations, + ) + + tools.config[ + "overwrite_existing_translations" + ] = overwrite_existing_translations + + _logger.info("Updating modules list...") + self.update_list() + changed_modules = self._get_modules_with_changed_checksum() + if not changed_modules and not self._get_modules_partially_installed(): + _logger.info( + "No checksum change detected in installed modules " + "and all modules installed, nothing to do." + ) + + return { + "type": "ir.actions.client", + "tag": "display_notification", + "params": { + "message": _( + "No checksum change detected in installed modules " + "and all modules installed, nothing to do." + ), + "type": "success", + "sticky": False, + }, + } + + _logger.info( + "Marking the following modules to upgrade, " + "for their checksums changed: %s...", + ",".join(changed_modules.mapped("name")), + ) + changed_modules.button_upgrade() + self.env.cr.commit() # pylint: disable=invalid-commit + # in rare situations, button_upgrade may fail without + # exception, this would lead to corruption because + # no upgrade would be performed and save_installed_checksums + # would update cheksums for modules that have not been upgraded + ensure_module_state(self.env, changed_modules, "to upgrade") + + _logger.info("Upgrading...") + self.env["base.module.upgrade"].upgrade_module() + self.env.cr.commit() # pylint: disable=invalid-commit + + _logger.info("Upgrade successful, updating checksums...") + self._save_installed_checksums() + self.env.cr.commit() # pylint: disable=invalid-commit + + partial_modules = self._get_modules_partially_installed() + if partial_modules: + raise IncompleteUpgradeError( + "Checksum upgrade successful " + "but incomplete for the following modules: %s" + % ",".join(partial_modules.mapped("name")) + ) + + _logger.info("Checksum upgrade complete.") + return { + "type": "ir.actions.client", + "tag": "display_notification", + "params": { + "message": _("Checksum upgrade complete."), + "type": "success", + "sticky": False, + }, + } diff --git a/module_auto_update/readme/CONFIGURE.rst b/module_auto_update/readme/CONFIGURE.rst new file mode 100644 index 00000000000..b46e745638c --- /dev/null +++ b/module_auto_update/readme/CONFIGURE.rst @@ -0,0 +1,9 @@ +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. diff --git a/module_auto_update/readme/CONTRIBUTORS.rst b/module_auto_update/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..d62dca127ee --- /dev/null +++ b/module_auto_update/readme/CONTRIBUTORS.rst @@ -0,0 +1,6 @@ +* Brent Hughes +* Juan José Scarafía +* Jairo Llopis +* Stéphane Bidoul (https://acsone.eu) +* Eric Antones +* Manuel Engel diff --git a/module_auto_update/readme/DESCRIPTION.rst b/module_auto_update/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..1c1cd09b1c5 --- /dev/null +++ b/module_auto_update/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +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. diff --git a/module_auto_update/readme/USAGE.rst b/module_auto_update/readme/USAGE.rst new file mode 100644 index 00000000000..8b3d386ea10 --- /dev/null +++ b/module_auto_update/readme/USAGE.rst @@ -0,0 +1,22 @@ +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. + +To invoke the upgrade mechanism, navigate to *Apps* menu and use the +*Auto-Upgrade Modules* button, available only in developer mode. Restarting +the Odoo instance is highly recommended to minify risk of any possible issues. + +Another easy way to invoke this upgrade mechanism is by issuing the following +in an Odoo shell session: + +.. code-block:: python + + env['ir.module.module'].upgrade_changed_checksum() diff --git a/module_auto_update/static/description/icon.png b/module_auto_update/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9 zeKEe+b0{#KWGp$F+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a/module_auto_update/static/description/index.html b/module_auto_update/static/description/index.html new file mode 100644 index 00000000000..8908e56a048 --- /dev/null +++ b/module_auto_update/static/description/index.html @@ -0,0 +1,465 @@ + + + + + + +Module Auto Update + + + +
+

Module Auto Update

+ + +

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

+

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.

+

To invoke the upgrade mechanism, navigate to Apps menu and use the +Auto-Upgrade Modules button, available only in developer mode. Restarting +the Odoo instance is highly recommended to minify risk of any possible issues.

+

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

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

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 smashing 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.

+

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.

+
+
+
+ + diff --git a/module_auto_update/tests/__init__.py b/module_auto_update/tests/__init__.py new file mode 100644 index 00000000000..98ee93c7ecf --- /dev/null +++ b/module_auto_update/tests/__init__.py @@ -0,0 +1,4 @@ +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from . import test_addon_hash +from . import test_module diff --git a/module_auto_update/tests/sample_module/README.rst b/module_auto_update/tests/sample_module/README.rst new file mode 100644 index 00000000000..e7d1726ca4c --- /dev/null +++ b/module_auto_update/tests/sample_module/README.rst @@ -0,0 +1 @@ +Sample module for tests addon_hash module. diff --git a/module_auto_update/tests/sample_module/data/f1.xml b/module_auto_update/tests/sample_module/data/f1.xml new file mode 100644 index 00000000000..23850747975 --- /dev/null +++ b/module_auto_update/tests/sample_module/data/f1.xml @@ -0,0 +1 @@ + diff --git a/module_auto_update/tests/sample_module/data/f2.xml b/module_auto_update/tests/sample_module/data/f2.xml new file mode 100644 index 00000000000..23850747975 --- /dev/null +++ b/module_auto_update/tests/sample_module/data/f2.xml @@ -0,0 +1 @@ + diff --git a/module_auto_update/tests/sample_module/i18n/en.po b/module_auto_update/tests/sample_module/i18n/en.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/module_auto_update/tests/sample_module/i18n/en_US.po b/module_auto_update/tests/sample_module/i18n/en_US.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/module_auto_update/tests/sample_module/i18n/fr.po b/module_auto_update/tests/sample_module/i18n/fr.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/module_auto_update/tests/sample_module/i18n/fr_BE.po b/module_auto_update/tests/sample_module/i18n/fr_BE.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/module_auto_update/tests/sample_module/i18n/test.pot b/module_auto_update/tests/sample_module/i18n/test.pot new file mode 100644 index 00000000000..e69de29bb2d diff --git a/module_auto_update/tests/sample_module/i18n_extra/en.po b/module_auto_update/tests/sample_module/i18n_extra/en.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/module_auto_update/tests/sample_module/i18n_extra/fr.po b/module_auto_update/tests/sample_module/i18n_extra/fr.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/module_auto_update/tests/sample_module/i18n_extra/nl_NL.po b/module_auto_update/tests/sample_module/i18n_extra/nl_NL.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/module_auto_update/tests/sample_module/models/stuff.py b/module_auto_update/tests/sample_module/models/stuff.py new file mode 100644 index 00000000000..911c43ed15c --- /dev/null +++ b/module_auto_update/tests/sample_module/models/stuff.py @@ -0,0 +1 @@ +_ = 1 + 1 diff --git a/module_auto_update/tests/sample_module/models/stuff.pyc b/module_auto_update/tests/sample_module/models/stuff.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2050f52c7c2e2c08bfb655555c80e4342a48a0c2 GIT binary patch literal 109 zcmZSn%**Avesxqb0~9a;X$K%K<^U2YObm=Ej10jV%s@^iBaraR1S!w}Vsrwmp}3?p ZElsbWvIL~tCO1E&G$+*#q^}sH0{{jG4&DF& literal 0 HcmV?d00001 diff --git a/module_auto_update/tests/sample_module/models/stuff.pyo b/module_auto_update/tests/sample_module/models/stuff.pyo new file mode 100644 index 0000000000000000000000000000000000000000..b592f19841e2fdfc90a584eb75703c9eed4782f2 GIT binary patch literal 109 zcmZSn%*$2zb3;@z0~9a;X$K%K<^U2YObm=Ej10jV%s@^iBaraR1S!w}Vsrwmp}3?p ZElsbWvIL~tCO1E&G$+*#q^}sH0{}a24`BcR literal 0 HcmV?d00001 diff --git a/module_auto_update/tests/sample_module/static/src/some.js b/module_auto_update/tests/sample_module/static/src/some.js new file mode 100644 index 00000000000..896fe66fe3e --- /dev/null +++ b/module_auto_update/tests/sample_module/static/src/some.js @@ -0,0 +1 @@ +/* Javascript */ diff --git a/module_auto_update/tests/test_addon_hash.py b/module_auto_update/tests/test_addon_hash.py new file mode 100644 index 00000000000..8c35f831aa2 --- /dev/null +++ b/module_auto_update/tests/test_addon_hash.py @@ -0,0 +1,76 @@ +# Copyright 2018 ACSONE SA/NV. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +import os +import unittest + +from .. import addon_hash +from ..models.module import DEFAULT_EXCLUDE_PATTERNS + + +class TestAddonHash(unittest.TestCase): + def setUp(self): + super(TestAddonHash, self).setUp() + self.sample_dir = os.path.join( + os.path.dirname(__file__), + "sample_module", + ) + + def test_basic(self): + files = list( + addon_hash._walk( + self.sample_dir, + exclude_patterns=["*/__pycache__/*"], + keep_langs=[], + ) + ) + self.assertEqual( + files, + [ + "README.rst", + "data/f1.xml", + "data/f2.xml", + "i18n/en.po", + "i18n/en_US.po", + "i18n/fr.po", + "i18n/fr_BE.po", + "i18n/test.pot", + "i18n_extra/en.po", + "i18n_extra/fr.po", + "i18n_extra/nl_NL.po", + "models/stuff.py", + "models/stuff.pyc", + "models/stuff.pyo", + "static/src/some.js", + ], + ) + + def test_exclude(self): + files = list( + addon_hash._walk( + self.sample_dir, + exclude_patterns=DEFAULT_EXCLUDE_PATTERNS.split(","), + keep_langs=["fr_FR", "nl"], + ) + ) + self.assertEqual( + files, + [ + "README.rst", + "data/f1.xml", + "data/f2.xml", + "i18n/fr.po", + "i18n/fr_BE.po", + "i18n_extra/fr.po", + "i18n_extra/nl_NL.po", + "models/stuff.py", + ], + ) + + def test2(self): + checksum = addon_hash.addon_hash( + self.sample_dir, + exclude_patterns=["*.pyc", "*.pyo", "*.pot", "static/*"], + keep_langs=["fr_FR", "nl"], + ) + self.assertEqual(checksum, "fecb89486c8a29d1f760cbd01c1950f6e8421b14") diff --git a/module_auto_update/tests/test_module.py b/module_auto_update/tests/test_module.py new file mode 100644 index 00000000000..f05b26164aa --- /dev/null +++ b/module_auto_update/tests/test_module.py @@ -0,0 +1,233 @@ +# Copyright 2017 LasLabs Inc. +# Copyright 2018 ACSONE SA/NV. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +import os +import tempfile + +import mock + +import odoo +from odoo.modules import get_module_path +from odoo.tests import TransactionCase + +from ..addon_hash import addon_hash +from ..models.module import DEFAULT_EXCLUDE_PATTERNS, IncompleteUpgradeError + +MODULE_NAME = "module_auto_update" + + +class TestModule(TransactionCase): + def setUp(self): + super(TestModule, self).setUp() + self.own_module = self.env["ir.module.module"].search( + [("name", "=", MODULE_NAME)] + ) + self.own_dir_path = get_module_path(MODULE_NAME) + keep_langs = self.env["res.lang"].search([]).mapped("code") + self.own_checksum = addon_hash( + self.own_dir_path, + exclude_patterns=DEFAULT_EXCLUDE_PATTERNS.split(","), + keep_langs=keep_langs, + ) + self.own_writeable = os.access(self.own_dir_path, os.W_OK) + + def test_compute_checksum_dir(self): + """It should compute the directory's SHA-1 hash""" + self.assertEqual( + self.own_module._get_checksum_dir(), + self.own_checksum, + "Module directory checksum not computed properly", + ) + + def test_compute_checksum_dir_ignore_excluded(self): + """It should exclude .pyc/.pyo extensions from checksum + calculations""" + if not self.own_writeable: + self.skipTest("Own directory not writeable") + with tempfile.NamedTemporaryFile(suffix=".pyc", dir=self.own_dir_path): + self.assertEqual( + self.own_module._get_checksum_dir(), + self.own_checksum, + "SHA1 checksum does not ignore excluded extensions", + ) + + def test_compute_checksum_dir_recomputes_when_file_added(self): + """It should return a different value when a non-.pyc/.pyo file is + added to the module directory""" + if not self.own_writeable: + self.skipTest("Own directory not writeable") + with tempfile.NamedTemporaryFile(suffix=".py", dir=self.own_dir_path): + self.assertNotEqual( + self.own_module._get_checksum_dir(), + self.own_checksum, + "SHA1 checksum not recomputed", + ) + + def test_saved_checksums(self): + Imm = self.env["ir.module.module"] + base_module = Imm.search([("name", "=", "base")]) + self.assertEqual(base_module.state, "installed") + self.assertFalse(Imm._get_saved_checksums()) + Imm._save_installed_checksums() + saved_checksums = Imm._get_saved_checksums() + self.assertTrue(saved_checksums) + self.assertTrue(saved_checksums["base"]) + + def test_get_modules_with_changed_checksum(self): + Imm = self.env["ir.module.module"] + self.assertTrue(Imm._get_modules_with_changed_checksum()) + Imm._save_installed_checksums() + self.assertFalse(Imm._get_modules_with_changed_checksum()) + + +@odoo.tests.tagged("post_install", "-at_install") +class TestModuleAfterInstall(TransactionCase): + def setUp(self): + super(TestModuleAfterInstall, self).setUp() + Imm = self.env["ir.module.module"] + self.own_module = Imm.search([("name", "=", MODULE_NAME)]) + self.base_module = Imm.search([("name", "=", "base")]) + + def test_get_modules_partially_installed(self): + Imm = self.env["ir.module.module"] + self.assertTrue(self.own_module not in Imm._get_modules_partially_installed()) + self.own_module.button_upgrade() + self.assertTrue(self.own_module in Imm._get_modules_partially_installed()) + self.own_module.button_upgrade_cancel() + self.assertTrue(self.own_module not in Imm._get_modules_partially_installed()) + + def test_upgrade_changed_checksum(self): + Imm = self.env["ir.module.module"] + Bmu = self.env["base.module.upgrade"] + + # check modules are in installed state + installed_modules = Imm.search([("state", "=", "installed")]) + self.assertTrue(self.own_module in installed_modules) + self.assertTrue(self.base_module in installed_modules) + self.assertTrue(len(installed_modules) > 2) + # change the checksum of 'base' + Imm._save_installed_checksums() + saved_checksums = Imm._get_saved_checksums() + saved_checksums["base"] = False + Imm._save_checksums(saved_checksums) + changed_modules = Imm._get_modules_with_changed_checksum() + self.assertEqual(len(changed_modules), 1) + self.assertTrue(self.base_module in changed_modules) + + def upgrade_module_mock(self_model): + upgrade_module_mock.call_count += 1 + # since we are upgrading base, all installed module + # must have been marked to upgrade at this stage + self.assertEqual(self.base_module.state, "to upgrade") + self.assertEqual(self.own_module.state, "to upgrade") + installed_modules.write({"state": "installed"}) + + upgrade_module_mock.call_count = 0 + + # upgrade_changed_checksum commits, so mock that + with mock.patch.object(self.env.cr, "commit"): + + # we simulate an install by setting module states + Bmu._patch_method("upgrade_module", upgrade_module_mock) + try: + Imm.upgrade_changed_checksum() + self.assertEqual(upgrade_module_mock.call_count, 1) + self.assertEqual(self.base_module.state, "installed") + self.assertEqual(self.own_module.state, "installed") + saved_checksums = Imm._get_saved_checksums() + self.assertTrue(saved_checksums["base"]) + self.assertTrue(saved_checksums[MODULE_NAME]) + finally: + Bmu._revert_method("upgrade_module") + + def test_incomplete_upgrade(self): + Imm = self.env["ir.module.module"] + Bmu = self.env["base.module.upgrade"] + + installed_modules = Imm.search([("state", "=", "installed")]) + # change the checksum of 'base' + Imm._save_installed_checksums() + saved_checksums = Imm._get_saved_checksums() + saved_checksums["base"] = False + Imm._save_checksums(saved_checksums) + + def upgrade_module_mock(self_model): + upgrade_module_mock.call_count += 1 + # since we are upgrading base, all installed module + # must have been marked to upgrade at this stage + self.assertEqual(self.base_module.state, "to upgrade") + self.assertEqual(self.own_module.state, "to upgrade") + installed_modules.write({"state": "installed"}) + # simulate partial upgrade + self.own_module.write({"state": "to upgrade"}) + + upgrade_module_mock.call_count = 0 + + # upgrade_changed_checksum commits, so mock that + with mock.patch.object(self.env.cr, "commit"): + + # we simulate an install by setting module states + Bmu._patch_method("upgrade_module", upgrade_module_mock) + try: + with self.assertRaises(IncompleteUpgradeError): + Imm.upgrade_changed_checksum() + self.assertEqual(upgrade_module_mock.call_count, 1) + finally: + Bmu._revert_method("upgrade_module") + + def test_incomplete_upgrade_no_checkusm(self): + Imm = self.env["ir.module.module"] + Bmu = self.env["base.module.upgrade"] + + installed_modules = Imm.search([("state", "=", "installed")]) + # change the checksum of 'base' + Imm._save_installed_checksums() + saved_checksums = Imm._get_saved_checksums() + + Imm._save_checksums(saved_checksums) + self.base_module.write({"state": "to upgrade"}) + + def upgrade_module_mock(self_model): + upgrade_module_mock.call_count += 1 + # since we are upgrading base, all installed module + # must have been marked to upgrade at this stage + self.assertEqual(self.base_module.state, "to upgrade") + self.assertEqual(self.own_module.state, "installed") + installed_modules.write({"state": "installed"}) + + upgrade_module_mock.call_count = 0 + + # upgrade_changed_checksum commits, so mock that + with mock.patch.object(self.env.cr, "commit"): + + # we simulate an install by setting module states + Bmu._patch_method("upgrade_module", upgrade_module_mock) + # got just other modules to_upgrade and no checksum ones + try: + Imm.upgrade_changed_checksum() + self.assertEqual(upgrade_module_mock.call_count, 1) + finally: + Bmu._revert_method("upgrade_module") + + def test_nothing_to_upgrade(self): + Imm = self.env["ir.module.module"] + Bmu = self.env["base.module.upgrade"] + + Imm._save_installed_checksums() + + def upgrade_module_mock(self_model): + upgrade_module_mock.call_count += 1 + + upgrade_module_mock.call_count = 0 + + # upgrade_changed_checksum commits, so mock that + with mock.patch.object(self.env.cr, "commit"): + + # we simulate an install by setting module states + Bmu._patch_method("upgrade_module", upgrade_module_mock) + try: + Imm.upgrade_changed_checksum() + self.assertEqual(upgrade_module_mock.call_count, 0) + finally: + Bmu._revert_method("upgrade_module") diff --git a/module_auto_update/views/ir_module_module.xml b/module_auto_update/views/ir_module_module.xml new file mode 100644 index 00000000000..05be0e927be --- /dev/null +++ b/module_auto_update/views/ir_module_module.xml @@ -0,0 +1,24 @@ + + + + + Auto-Upgrade Modules + ir.actions.server + + code + + action = model.upgrade_changed_checksum() + + + + From 32be0a8ae1d5b67984e3d5a606af13fcc399f539 Mon Sep 17 00:00:00 2001 From: Ignacio Buioli Date: Sun, 4 Sep 2022 03:51:13 +0000 Subject: [PATCH 02/25] Added translation using Weblate (Spanish (Argentina)) --- module_auto_update/i18n/es_AR.po | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 module_auto_update/i18n/es_AR.po diff --git a/module_auto_update/i18n/es_AR.po b/module_auto_update/i18n/es_AR.po new file mode 100644 index 00000000000..b6c8e3f9603 --- /dev/null +++ b/module_auto_update/i18n/es_AR.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * module_auto_update +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es_AR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: module_auto_update +#: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum +#: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum +msgid "Auto-Upgrade Modules" +msgstr "" + +#. module: module_auto_update +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." +msgstr "" + +#. module: module_auto_update +#: model:ir.model,name:module_auto_update.model_ir_module_module +msgid "Module" +msgstr "" + +#. module: module_auto_update +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." +msgstr "" From 61e4486e8b7b3a7e998eeea7e55cd2c132c45a32 Mon Sep 17 00:00:00 2001 From: Ignacio Buioli Date: Sun, 4 Sep 2022 03:54:22 +0000 Subject: [PATCH 03/25] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (4 of 4 strings) Translation: server-tools-15.0/server-tools-15.0-module_auto_update Translate-URL: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-module_auto_update/es_AR/ --- module_auto_update/i18n/es_AR.po | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/module_auto_update/i18n/es_AR.po b/module_auto_update/i18n/es_AR.po index b6c8e3f9603..7023c2f6df6 100644 --- a/module_auto_update/i18n/es_AR.po +++ b/module_auto_update/i18n/es_AR.po @@ -6,30 +6,32 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2022-09-04 06:07+0000\n" +"Last-Translator: Ignacio Buioli \n" "Language-Team: none\n" "Language: es_AR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" #. module: module_auto_update #: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum #: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum msgid "Auto-Upgrade Modules" -msgstr "" +msgstr "Módulos Auto-Actualizables" #. module: module_auto_update #: code:addons/module_auto_update/models/module.py:0 #, python-format msgid "Checksum upgrade complete." -msgstr "" +msgstr "Actualización de suma de comprobación completa." #. module: module_auto_update #: model:ir.model,name:module_auto_update.model_ir_module_module msgid "Module" -msgstr "" +msgstr "Módulo" #. module: module_auto_update #: code:addons/module_auto_update/models/module.py:0 @@ -38,3 +40,5 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" +"No se detectó ningún cambio de suma de comprobación en los módulos " +"instalados y todos los módulos instalados, nada que hacer." From 084d94f454581087a5b8ae152101d17f26d1d211 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Sun, 15 Jan 2023 15:19:13 +0100 Subject: [PATCH 04/25] dotfiles --- module_auto_update/tests/sample_module/i18n/en.po | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 module_auto_update/tests/sample_module/i18n/en.po diff --git a/module_auto_update/tests/sample_module/i18n/en.po b/module_auto_update/tests/sample_module/i18n/en.po deleted file mode 100644 index e69de29bb2d..00000000000 From e4288e57d656d219bf2034fdf4f69b7b1405a147 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 15 Jan 2023 16:52:14 +0000 Subject: [PATCH 05/25] module_auto_update 15.0.1.0.1 --- module_auto_update/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module_auto_update/__manifest__.py b/module_auto_update/__manifest__.py index 37b2f791598..a618d32c8d3 100644 --- a/module_auto_update/__manifest__.py +++ b/module_auto_update/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Module Auto Update", "summary": "Automatically update Odoo modules", - "version": "15.0.1.0.0", + "version": "15.0.1.0.1", "category": "Extra Tools", "website": "https://github.com/OCA/server-tools", "author": "LasLabs, " From 458d4ed7946aa57cccc0bbebc72115f37cfeeb5d Mon Sep 17 00:00:00 2001 From: fkantelberg Date: Tue, 7 Feb 2023 14:46:54 +0100 Subject: [PATCH 06/25] module_auto_update: Migration to 16.0 --- module_auto_update/__manifest__.py | 2 +- module_auto_update/models/module.py | 2 +- module_auto_update/tests/test_module.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/module_auto_update/__manifest__.py b/module_auto_update/__manifest__.py index a618d32c8d3..caf030b5920 100644 --- a/module_auto_update/__manifest__.py +++ b/module_auto_update/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Module Auto Update", "summary": "Automatically update Odoo modules", - "version": "15.0.1.0.1", + "version": "16.0.1.0.0", "category": "Extra Tools", "website": "https://github.com/OCA/server-tools", "author": "LasLabs, " diff --git a/module_auto_update/models/module.py b/module_auto_update/models/module.py index b50bf1ccd70..4ecc19bcbef 100644 --- a/module_auto_update/models/module.py +++ b/module_auto_update/models/module.py @@ -80,7 +80,7 @@ def _get_saved_checksums(self): def _save_checksums(self, checksums): Icp = self.env["ir.config_parameter"] Icp.set_param(PARAM_INSTALLED_CHECKSUMS, json.dumps(checksums)) - Icp.flush() + Icp.flush_model() @api.model def _save_installed_checksums(self): diff --git a/module_auto_update/tests/test_module.py b/module_auto_update/tests/test_module.py index f05b26164aa..0b74ed775c9 100644 --- a/module_auto_update/tests/test_module.py +++ b/module_auto_update/tests/test_module.py @@ -4,8 +4,7 @@ import os import tempfile - -import mock +from unittest import mock import odoo from odoo.modules import get_module_path From c88e79acdd91662c206e325c900a9d12a24a261b Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 13 Apr 2023 08:41:17 +0000 Subject: [PATCH 07/25] Update module_auto_update.pot --- module_auto_update/i18n/module_auto_update.pot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module_auto_update/i18n/module_auto_update.pot b/module_auto_update/i18n/module_auto_update.pot index 3246fc0670f..f4571dc9411 100644 --- a/module_auto_update/i18n/module_auto_update.pot +++ b/module_auto_update/i18n/module_auto_update.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -20,6 +20,7 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update +#. odoo-python #: code:addons/module_auto_update/models/module.py:0 #, python-format msgid "Checksum upgrade complete." @@ -31,6 +32,7 @@ msgid "Module" msgstr "" #. module: module_auto_update +#. odoo-python #: code:addons/module_auto_update/models/module.py:0 #, python-format msgid "" From e63420cf62b36d4599b98da2d966a1de8a75c3dc Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 13 Apr 2023 08:43:40 +0000 Subject: [PATCH 08/25] README.rst --- module_auto_update/README.rst | 10 +++++----- module_auto_update/static/description/index.html | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/module_auto_update/README.rst b/module_auto_update/README.rst index 809901e1833..2c9fabb5613 100644 --- a/module_auto_update/README.rst +++ b/module_auto_update/README.rst @@ -14,13 +14,13 @@ Module Auto Update :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github - :target: https://github.com/OCA/server-tools/tree/15.0/module_auto_update + :target: https://github.com/OCA/server-tools/tree/16.0/module_auto_update :alt: OCA/server-tools .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-module_auto_update + :target: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-module_auto_update :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/15.0 + :target: https://runbot.odoo-community.org/runbot/149/16.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -80,7 +80,7 @@ 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 smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -118,6 +118,6 @@ 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. -This module is part of the `OCA/server-tools `_ project on GitHub. +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. diff --git a/module_auto_update/static/description/index.html b/module_auto_update/static/description/index.html index 8908e56a048..1eeab404053 100644 --- a/module_auto_update/static/description/index.html +++ b/module_auto_update/static/description/index.html @@ -367,7 +367,7 @@

Module Auto Update

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

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 @@ -424,7 +424,7 @@

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 smashing it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -456,7 +456,7 @@

Maintainers

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.

-

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

+

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.

From d66d47be0aad64e9d9f604b79cdd6a3c6be1d555 Mon Sep 17 00:00:00 2001 From: Weblate Date: Thu, 13 Apr 2023 11:14:08 +0000 Subject: [PATCH 09/25] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-16.0/server-tools-16.0-module_auto_update Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-module_auto_update/ --- module_auto_update/i18n/ca.po | 24 ++++++++----------- module_auto_update/i18n/cs_CZ.po | 24 ++++++++----------- module_auto_update/i18n/de.po | 24 ++++++++----------- module_auto_update/i18n/es.po | 24 ++++++++----------- module_auto_update/i18n/es_AR.po | 2 ++ module_auto_update/i18n/es_MX.po | 24 ++++++++----------- module_auto_update/i18n/fr.po | 32 +++++++++++++------------ module_auto_update/i18n/hr.po | 24 ++++++++----------- module_auto_update/i18n/it.po | 40 +++++++++++++++++++------------- module_auto_update/i18n/nl_NL.po | 24 ++++++++----------- module_auto_update/i18n/pt_BR.po | 24 ++++++++----------- module_auto_update/i18n/sl.po | 24 ++++++++----------- module_auto_update/i18n/tr.po | 24 ++++++++----------- module_auto_update/i18n/zh_CN.po | 24 ++++++++----------- 14 files changed, 153 insertions(+), 185 deletions(-) diff --git a/module_auto_update/i18n/ca.po b/module_auto_update/i18n/ca.po index 4632861512d..b849b9d3b60 100644 --- a/module_auto_update/i18n/ca.po +++ b/module_auto_update/i18n/ca.po @@ -25,18 +25,10 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -45,6 +37,10 @@ msgid "Module" msgstr "Mòdul" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" diff --git a/module_auto_update/i18n/cs_CZ.po b/module_auto_update/i18n/cs_CZ.po index 551f1b61bd9..c7b7232d841 100644 --- a/module_auto_update/i18n/cs_CZ.po +++ b/module_auto_update/i18n/cs_CZ.po @@ -26,18 +26,10 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -46,8 +38,12 @@ msgid "Module" msgstr "Modul" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" #~ msgid "Checksum Dir" diff --git a/module_auto_update/i18n/de.po b/module_auto_update/i18n/de.po index d873fedecca..841baa2a324 100644 --- a/module_auto_update/i18n/de.po +++ b/module_auto_update/i18n/de.po @@ -25,18 +25,10 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -45,8 +37,12 @@ msgid "Module" msgstr "Modul" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" #~ msgid "Module Upgrade" diff --git a/module_auto_update/i18n/es.po b/module_auto_update/i18n/es.po index 3be21985596..6076e6062a9 100644 --- a/module_auto_update/i18n/es.po +++ b/module_auto_update/i18n/es.po @@ -26,18 +26,10 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -46,8 +38,12 @@ msgid "Module" msgstr "Módulo" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" #~ msgid "Module Upgrade" diff --git a/module_auto_update/i18n/es_AR.po b/module_auto_update/i18n/es_AR.po index 7023c2f6df6..7f9e6ba8aa4 100644 --- a/module_auto_update/i18n/es_AR.po +++ b/module_auto_update/i18n/es_AR.po @@ -23,6 +23,7 @@ msgid "Auto-Upgrade Modules" msgstr "Módulos Auto-Actualizables" #. module: module_auto_update +#. odoo-python #: code:addons/module_auto_update/models/module.py:0 #, python-format msgid "Checksum upgrade complete." @@ -34,6 +35,7 @@ msgid "Module" msgstr "Módulo" #. module: module_auto_update +#. odoo-python #: code:addons/module_auto_update/models/module.py:0 #, python-format msgid "" diff --git a/module_auto_update/i18n/es_MX.po b/module_auto_update/i18n/es_MX.po index d21bad0841f..41832a6b174 100644 --- a/module_auto_update/i18n/es_MX.po +++ b/module_auto_update/i18n/es_MX.po @@ -26,18 +26,10 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -46,6 +38,10 @@ msgid "Module" msgstr "Módulo" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" diff --git a/module_auto_update/i18n/fr.po b/module_auto_update/i18n/fr.po index 319447d33e1..48cbd18cf37 100644 --- a/module_auto_update/i18n/fr.po +++ b/module_auto_update/i18n/fr.po @@ -26,18 +26,10 @@ msgid "Auto-Upgrade Modules" msgstr "Mise à jour automatique des modules" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "Nom affiché" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -46,9 +38,19 @@ msgid "Module" msgstr "Module" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" -msgstr "Recherche intelligente" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." +msgstr "" + +#~ msgid "Display Name" +#~ msgstr "Nom affiché" + +#~ msgid "Smart Search" +#~ msgstr "Recherche intelligente" #~ msgid "Checksum Dir" #~ msgstr "Somme de contrôle du dossier" diff --git a/module_auto_update/i18n/hr.po b/module_auto_update/i18n/hr.po index 044265934f9..b6cfb2113f9 100644 --- a/module_auto_update/i18n/hr.po +++ b/module_auto_update/i18n/hr.po @@ -26,18 +26,10 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -46,6 +38,10 @@ msgid "Module" msgstr "Modul" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" diff --git a/module_auto_update/i18n/it.po b/module_auto_update/i18n/it.po index bdf31c43ce2..ad56b4bc410 100644 --- a/module_auto_update/i18n/it.po +++ b/module_auto_update/i18n/it.po @@ -26,19 +26,11 @@ msgid "Auto-Upgrade Modules" msgstr "Aggiorna Moduli Automaticamente" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "Nome da visualizzare" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "ID" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" -msgstr "Ultima modifica il" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." +msgstr "" #. module: module_auto_update #: model:ir.model,name:module_auto_update.model_ir_module_module @@ -46,6 +38,22 @@ msgid "Module" msgstr "Modulo" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" -msgstr "Ricerca Smart" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." +msgstr "" + +#~ msgid "Display Name" +#~ msgstr "Nome da visualizzare" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" + +#~ msgid "Smart Search" +#~ msgstr "Ricerca Smart" diff --git a/module_auto_update/i18n/nl_NL.po b/module_auto_update/i18n/nl_NL.po index 478f0b30c4d..f1c0a5b96f7 100644 --- a/module_auto_update/i18n/nl_NL.po +++ b/module_auto_update/i18n/nl_NL.po @@ -26,18 +26,10 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -46,6 +38,10 @@ msgid "Module" msgstr "Module" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" diff --git a/module_auto_update/i18n/pt_BR.po b/module_auto_update/i18n/pt_BR.po index 65aa4916df1..5e06105a2fb 100644 --- a/module_auto_update/i18n/pt_BR.po +++ b/module_auto_update/i18n/pt_BR.po @@ -27,18 +27,10 @@ msgid "Auto-Upgrade Modules" msgstr "Módulos de atualização automática" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -47,6 +39,10 @@ msgid "Module" msgstr "Módulo" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" diff --git a/module_auto_update/i18n/sl.po b/module_auto_update/i18n/sl.po index ab41d6aee67..d7baeac7bab 100644 --- a/module_auto_update/i18n/sl.po +++ b/module_auto_update/i18n/sl.po @@ -26,18 +26,10 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -46,6 +38,10 @@ msgid "Module" msgstr "Modul" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" diff --git a/module_auto_update/i18n/tr.po b/module_auto_update/i18n/tr.po index 21e79edb78d..e626244e4f2 100644 --- a/module_auto_update/i18n/tr.po +++ b/module_auto_update/i18n/tr.po @@ -25,18 +25,10 @@ msgid "Auto-Upgrade Modules" msgstr "" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -45,6 +37,10 @@ msgid "Module" msgstr "Modül" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" diff --git a/module_auto_update/i18n/zh_CN.po b/module_auto_update/i18n/zh_CN.po index 3225e30d930..8263f2d1843 100644 --- a/module_auto_update/i18n/zh_CN.po +++ b/module_auto_update/i18n/zh_CN.po @@ -23,18 +23,10 @@ msgid "Auto-Upgrade Modules" msgstr "自动升级模块" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__display_name -msgid "Display Name" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__id -msgid "ID" -msgstr "" - -#. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module____last_update -msgid "Last Modified on" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "Checksum upgrade complete." msgstr "" #. module: module_auto_update @@ -43,6 +35,10 @@ msgid "Module" msgstr "模块" #. module: module_auto_update -#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search -msgid "Smart Search" +#. odoo-python +#: code:addons/module_auto_update/models/module.py:0 +#, python-format +msgid "" +"No checksum change detected in installed modules and all modules installed, " +"nothing to do." msgstr "" From e2be56572ff93a5f7e11728fadc1ea0b14bb0c6e Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 7 Jun 2023 15:42:30 +0000 Subject: [PATCH 10/25] Update module_auto_update.pot --- module_auto_update/i18n/module_auto_update.pot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module_auto_update/i18n/module_auto_update.pot b/module_auto_update/i18n/module_auto_update.pot index f4571dc9411..caef4fa9e4d 100644 --- a/module_auto_update/i18n/module_auto_update.pot +++ b/module_auto_update/i18n/module_auto_update.pot @@ -39,3 +39,8 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" From 3b8896832598ec23b4bbdc2b2dd7c8e480422934 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 7 Jun 2023 15:49:39 +0000 Subject: [PATCH 11/25] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-16.0/server-tools-16.0-module_auto_update Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-module_auto_update/ --- module_auto_update/i18n/ca.po | 5 +++++ module_auto_update/i18n/cs_CZ.po | 5 +++++ module_auto_update/i18n/de.po | 5 +++++ module_auto_update/i18n/es.po | 5 +++++ module_auto_update/i18n/es_AR.po | 5 +++++ module_auto_update/i18n/es_MX.po | 5 +++++ module_auto_update/i18n/fr.po | 8 +++++--- module_auto_update/i18n/hr.po | 5 +++++ module_auto_update/i18n/it.po | 8 +++++--- module_auto_update/i18n/nl_NL.po | 5 +++++ module_auto_update/i18n/pt_BR.po | 5 +++++ module_auto_update/i18n/sl.po | 5 +++++ module_auto_update/i18n/tr.po | 5 +++++ module_auto_update/i18n/zh_CN.po | 5 +++++ 14 files changed, 70 insertions(+), 6 deletions(-) diff --git a/module_auto_update/i18n/ca.po b/module_auto_update/i18n/ca.po index b849b9d3b60..103a0a8bfc9 100644 --- a/module_auto_update/i18n/ca.po +++ b/module_auto_update/i18n/ca.po @@ -44,3 +44,8 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/cs_CZ.po b/module_auto_update/i18n/cs_CZ.po index c7b7232d841..c619ee60cd6 100644 --- a/module_auto_update/i18n/cs_CZ.po +++ b/module_auto_update/i18n/cs_CZ.po @@ -46,6 +46,11 @@ msgid "" "nothing to do." msgstr "" +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" + #~ msgid "Checksum Dir" #~ msgstr "Kontrolní součet Dir" diff --git a/module_auto_update/i18n/de.po b/module_auto_update/i18n/de.po index 841baa2a324..0b87c5092d5 100644 --- a/module_auto_update/i18n/de.po +++ b/module_auto_update/i18n/de.po @@ -45,6 +45,11 @@ msgid "" "nothing to do." msgstr "" +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" + #~ msgid "Module Upgrade" #~ msgstr "Modul aktualisieren" diff --git a/module_auto_update/i18n/es.po b/module_auto_update/i18n/es.po index 6076e6062a9..e0a8bdd15c8 100644 --- a/module_auto_update/i18n/es.po +++ b/module_auto_update/i18n/es.po @@ -46,6 +46,11 @@ msgid "" "nothing to do." msgstr "" +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" + #~ msgid "Module Upgrade" #~ msgstr "Actualización de módulo" diff --git a/module_auto_update/i18n/es_AR.po b/module_auto_update/i18n/es_AR.po index 7f9e6ba8aa4..f4320972f96 100644 --- a/module_auto_update/i18n/es_AR.po +++ b/module_auto_update/i18n/es_AR.po @@ -44,3 +44,8 @@ msgid "" msgstr "" "No se detectó ningún cambio de suma de comprobación en los módulos " "instalados y todos los módulos instalados, nada que hacer." + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/es_MX.po b/module_auto_update/i18n/es_MX.po index 41832a6b174..3e15a69fee1 100644 --- a/module_auto_update/i18n/es_MX.po +++ b/module_auto_update/i18n/es_MX.po @@ -45,3 +45,8 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/fr.po b/module_auto_update/i18n/fr.po index 48cbd18cf37..d7e59316e63 100644 --- a/module_auto_update/i18n/fr.po +++ b/module_auto_update/i18n/fr.po @@ -46,12 +46,14 @@ msgid "" "nothing to do." msgstr "" +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "Recherche intelligente" + #~ msgid "Display Name" #~ msgstr "Nom affiché" -#~ msgid "Smart Search" -#~ msgstr "Recherche intelligente" - #~ msgid "Checksum Dir" #~ msgstr "Somme de contrôle du dossier" diff --git a/module_auto_update/i18n/hr.po b/module_auto_update/i18n/hr.po index b6cfb2113f9..f1189b8ec13 100644 --- a/module_auto_update/i18n/hr.po +++ b/module_auto_update/i18n/hr.po @@ -45,3 +45,8 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/it.po b/module_auto_update/i18n/it.po index ad56b4bc410..75b47a90a87 100644 --- a/module_auto_update/i18n/it.po +++ b/module_auto_update/i18n/it.po @@ -46,6 +46,11 @@ msgid "" "nothing to do." msgstr "" +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "Ricerca Smart" + #~ msgid "Display Name" #~ msgstr "Nome da visualizzare" @@ -54,6 +59,3 @@ msgstr "" #~ msgid "Last Modified on" #~ msgstr "Ultima modifica il" - -#~ msgid "Smart Search" -#~ msgstr "Ricerca Smart" diff --git a/module_auto_update/i18n/nl_NL.po b/module_auto_update/i18n/nl_NL.po index f1c0a5b96f7..1c2e0a8de08 100644 --- a/module_auto_update/i18n/nl_NL.po +++ b/module_auto_update/i18n/nl_NL.po @@ -45,3 +45,8 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/pt_BR.po b/module_auto_update/i18n/pt_BR.po index 5e06105a2fb..81c5a7d9b29 100644 --- a/module_auto_update/i18n/pt_BR.po +++ b/module_auto_update/i18n/pt_BR.po @@ -46,3 +46,8 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/sl.po b/module_auto_update/i18n/sl.po index d7baeac7bab..fabe7a83600 100644 --- a/module_auto_update/i18n/sl.po +++ b/module_auto_update/i18n/sl.po @@ -45,3 +45,8 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/tr.po b/module_auto_update/i18n/tr.po index e626244e4f2..b4673ced474 100644 --- a/module_auto_update/i18n/tr.po +++ b/module_auto_update/i18n/tr.po @@ -44,3 +44,8 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" diff --git a/module_auto_update/i18n/zh_CN.po b/module_auto_update/i18n/zh_CN.po index 8263f2d1843..3464b47066c 100644 --- a/module_auto_update/i18n/zh_CN.po +++ b/module_auto_update/i18n/zh_CN.po @@ -42,3 +42,8 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" + +#. module: module_auto_update +#: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search +msgid "Smart Search" +msgstr "" From d1e6e8d877673304c1205cc3856ed29161b3a99c Mon Sep 17 00:00:00 2001 From: Ignacio Buioli Date: Fri, 9 Jun 2023 13:42:25 +0000 Subject: [PATCH 12/25] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (5 of 5 strings) Translation: server-tools-16.0/server-tools-16.0-module_auto_update Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-module_auto_update/es_AR/ --- module_auto_update/i18n/es_AR.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module_auto_update/i18n/es_AR.po b/module_auto_update/i18n/es_AR.po index f4320972f96..97bb2d672c4 100644 --- a/module_auto_update/i18n/es_AR.po +++ b/module_auto_update/i18n/es_AR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2022-09-04 06:07+0000\n" +"PO-Revision-Date: 2023-06-09 16:09+0000\n" "Last-Translator: Ignacio Buioli \n" "Language-Team: none\n" "Language: es_AR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.2\n" +"X-Generator: Weblate 4.17\n" #. module: module_auto_update #: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum @@ -48,4 +48,4 @@ msgstr "" #. module: module_auto_update #: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search msgid "Smart Search" -msgstr "" +msgstr "Búsqueda Inteligente" From 48cbb7e12d28eb60bfa0c6f7798b5f85aff85a2a Mon Sep 17 00:00:00 2001 From: Ivorra78 Date: Sun, 27 Aug 2023 07:54:46 +0000 Subject: [PATCH 13/25] Translated using Weblate (Spanish) Currently translated at 100.0% (5 of 5 strings) Translation: server-tools-16.0/server-tools-16.0-module_auto_update Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-module_auto_update/es/ --- module_auto_update/i18n/es.po | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/module_auto_update/i18n/es.po b/module_auto_update/i18n/es.po index e0a8bdd15c8..4a692d4b115 100644 --- a/module_auto_update/i18n/es.po +++ b/module_auto_update/i18n/es.po @@ -10,27 +10,28 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-03-03 10:08+0000\n" -"PO-Revision-Date: 2018-03-03 10:08+0000\n" -"Last-Translator: enjolras , 2018\n" +"PO-Revision-Date: 2023-09-03 00:15+0000\n" +"Last-Translator: Ivorra78 \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" #. module: module_auto_update #: model:ir.actions.server,name:module_auto_update.ir_module_module_upgrade_changed_checksum #: model:ir.ui.menu,name:module_auto_update.menu_ir_module_module_upgrade_changed_checksum msgid "Auto-Upgrade Modules" -msgstr "" +msgstr "Módulos de actualización automática" #. module: module_auto_update #. odoo-python #: code:addons/module_auto_update/models/module.py:0 #, python-format msgid "Checksum upgrade complete." -msgstr "" +msgstr "Actualización de la suma de comprobación completada." #. module: module_auto_update #: model:ir.model,name:module_auto_update.model_ir_module_module @@ -45,11 +46,13 @@ msgid "" "No checksum change detected in installed modules and all modules installed, " "nothing to do." msgstr "" +"No se ha detectado ningún cambio en la suma de comprobación de los módulos " +"instalados y todos los módulos están instalados, no hay nada que hacer." #. module: module_auto_update #: model:ir.model.fields,field_description:module_auto_update.field_ir_module_module__smart_search msgid "Smart Search" -msgstr "" +msgstr "Búsqueda inteligente" #~ msgid "Module Upgrade" #~ msgstr "Actualización de módulo" From 33ca3a34fde832b10caf642aae5d0737b2ab6b52 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 3 Sep 2023 16:49:46 +0000 Subject: [PATCH 14/25] README.rst --- module_auto_update/README.rst | 15 ++++--- .../static/description/index.html | 42 ++++++++++--------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/module_auto_update/README.rst b/module_auto_update/README.rst index 2c9fabb5613..5f34a00fd9e 100644 --- a/module_auto_update/README.rst +++ b/module_auto_update/README.rst @@ -2,10 +2,13 @@ Module Auto Update ================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:82249628349b0696b7966b62bca11314944312d4d6d2ae721e5ef6f543eae06b + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Module Auto Update .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-module_auto_update :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/16.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| 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 @@ -79,7 +82,7 @@ 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 smashing it by providing a detailed and welcomed +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. diff --git a/module_auto_update/static/description/index.html b/module_auto_update/static/description/index.html index 1eeab404053..7f8334960bf 100644 --- a/module_auto_update/static/description/index.html +++ b/module_auto_update/static/description/index.html @@ -1,20 +1,20 @@ - + - + Module Auto Update