From 5bef5cc20957be199b2fd94668861f0374683b30 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Fri, 5 Jan 2018 13:55:52 +0000 Subject: [PATCH] [MIG] module_auto_update: Migrate to v11 --- module_auto_update/README.rst | 7 ++++--- module_auto_update/__init__.py | 2 -- module_auto_update/__manifest__.py | 4 ++-- module_auto_update/data/cron_data.xml | 11 ++++++++--- module_auto_update/hooks.py | 1 - module_auto_update/models/__init__.py | 2 -- module_auto_update/models/module.py | 1 - module_auto_update/tests/__init__.py | 2 -- module_auto_update/tests/test_module.py | 1 - module_auto_update/tests/test_module_upgrade.py | 1 - module_auto_update/wizards/__init__.py | 2 -- module_auto_update/wizards/module_upgrade.py | 2 +- requirements.txt | 1 + 13 files changed, 16 insertions(+), 21 deletions(-) create mode 100644 requirements.txt diff --git a/module_auto_update/README.rst b/module_auto_update/README.rst index 3535f4fb2..6349fdd7b 100644 --- a/module_auto_update/README.rst +++ b/module_auto_update/README.rst @@ -15,7 +15,7 @@ Installation Prior to installing this module, you need to: -#. Install checksumdir with `pip install checksumdir` +#. Install checksumdir with ``pip install checksumdir`` #. Ensure all installed modules are up-to-date. When installed, this module will assume the versions found in the addons directories are currently installed. Configuration @@ -23,7 +23,7 @@ Configuration The default time for checking and applying upgrades is 3:00 AM (UTC). To change this schedule, modify the "Perform Module Upgrades" scheduled action. -This module will ignore .pyc and .pyo file extensions by default. To modify this, create a module_auto_update.checksum_excluded_extensions system parameter with the desired extensions listed as comma-separated values. +This module will ignore ``.pyc`` and ``.pyo`` file extensions by default. To modify this, create a ``module_auto_update.checksum_excluded_extensions`` system parameter with the desired extensions listed as comma-separated values. Usage ===== @@ -34,7 +34,7 @@ To perform upgrades manually, click the "Apply Scheduled Upgrades" menu item in .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/149/10.0 + :target: https://runbot.odoo-community.org/runbot/149/11.0 Bug Tracker =========== @@ -57,6 +57,7 @@ Contributors * Brent Hughes * Juan José Scarafía +* Jairo Llopis Do not contact contributors directly about support or help with technical issues. diff --git a/module_auto_update/__init__.py b/module_auto_update/__init__.py index 36f555442..c80c51237 100644 --- a/module_auto_update/__init__.py +++ b/module_auto_update/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from . import models diff --git a/module_auto_update/__manifest__.py b/module_auto_update/__manifest__.py index 57a5846db..50a6578ae 100644 --- a/module_auto_update/__manifest__.py +++ b/module_auto_update/__manifest__.py @@ -1,15 +1,15 @@ -# -*- coding: utf-8 -*- # Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { 'name': 'Module Auto Update', 'summary': 'Automatically update Odoo modules', - 'version': '10.0.1.0.1', + 'version': '11.0.1.0.0', 'category': 'Extra Tools', 'website': 'https://odoo-community.org/', 'author': 'LasLabs, ' 'Juan José Scarafía, ' + 'Tecnativa, ' 'Odoo Community Association (OCA)', 'license': 'LGPL-3', 'application': False, diff --git a/module_auto_update/data/cron_data.xml b/module_auto_update/data/cron_data.xml index 1745fe0c9..9b5b1cc6b 100644 --- a/module_auto_update/data/cron_data.xml +++ b/module_auto_update/data/cron_data.xml @@ -1,4 +1,8 @@ + + Perform Module Upgrades @@ -8,8 +12,9 @@ days -1 - base.module.upgrade - upgrade_module - + + code + model.upgrade_module() + diff --git a/module_auto_update/hooks.py b/module_auto_update/hooks.py index f062966c3..56d60c6ef 100644 --- a/module_auto_update/hooks.py +++ b/module_auto_update/hooks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/module_auto_update/models/__init__.py b/module_auto_update/models/__init__.py index b27944126..e5ee3ea66 100644 --- a/module_auto_update/models/__init__.py +++ b/module_auto_update/models/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from . import module diff --git a/module_auto_update/models/module.py b/module_auto_update/models/module.py index 398809e61..271bc5700 100644 --- a/module_auto_update/models/module.py +++ b/module_auto_update/models/module.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/module_auto_update/tests/__init__.py b/module_auto_update/tests/__init__.py index 237970451..06952e34e 100644 --- a/module_auto_update/tests/__init__.py +++ b/module_auto_update/tests/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from . import test_module diff --git a/module_auto_update/tests/test_module.py b/module_auto_update/tests/test_module.py index f8fcf7278..08fda9841 100644 --- a/module_auto_update/tests/test_module.py +++ b/module_auto_update/tests/test_module.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/module_auto_update/tests/test_module_upgrade.py b/module_auto_update/tests/test_module_upgrade.py index 0f908d5e0..880c80d00 100644 --- a/module_auto_update/tests/test_module_upgrade.py +++ b/module_auto_update/tests/test_module_upgrade.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/module_auto_update/wizards/__init__.py b/module_auto_update/wizards/__init__.py index 58cb00103..0448de3cf 100644 --- a/module_auto_update/wizards/__init__.py +++ b/module_auto_update/wizards/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from . import module_upgrade diff --git a/module_auto_update/wizards/module_upgrade.py b/module_auto_update/wizards/module_upgrade.py index 3ab297d18..8634c38e5 100644 --- a/module_auto_update/wizards/module_upgrade.py +++ b/module_auto_update/wizards/module_upgrade.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). @@ -9,6 +8,7 @@ class ModuleUpgrade(models.TransientModel): _inherit = 'base.module.upgrade' @api.model + @api.returns('ir.module.module') def get_module_list(self): """Set modules to upgrade searching by their dir checksum.""" Module = self.env["ir.module.module"] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..1ff56e771 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +checksumdir