Browse Source

[MIG] module_auto_update: Migrate to v11

pull/1382/head
Jairo Llopis 7 years ago
committed by Stéphane Bidoul (ACSONE)
parent
commit
6cb53987c4
No known key found for this signature in database GPG Key ID: BCAB2555446B5B92
  1. 7
      module_auto_update/README.rst
  2. 2
      module_auto_update/__init__.py
  3. 4
      module_auto_update/__manifest__.py
  4. 11
      module_auto_update/data/cron_data.xml
  5. 1
      module_auto_update/hooks.py
  6. 2
      module_auto_update/models/__init__.py
  7. 1
      module_auto_update/models/module.py
  8. 2
      module_auto_update/tests/__init__.py
  9. 1
      module_auto_update/tests/test_module.py
  10. 1
      module_auto_update/tests/test_module_upgrade.py
  11. 2
      module_auto_update/wizards/__init__.py
  12. 2
      module_auto_update/wizards/module_upgrade.py

7
module_auto_update/README.rst

@ -15,7 +15,7 @@ Installation
Prior to installing this module, you need to: 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. #. 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 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. 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 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 .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot :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 Bug Tracker
=========== ===========
@ -57,6 +57,7 @@ Contributors
* Brent Hughes <brent.hughes@laslabs.com> * Brent Hughes <brent.hughes@laslabs.com>
* Juan José Scarafía <jjs@adhoc.com.ar> * Juan José Scarafía <jjs@adhoc.com.ar>
* Jairo Llopis <jairo.llopis@tecnativa.com>
Do not contact contributors directly about support or help with technical issues. Do not contact contributors directly about support or help with technical issues.

2
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). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from . import models from . import models

4
module_auto_update/__manifest__.py

@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc. # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{ {
'name': 'Module Auto Update', 'name': 'Module Auto Update',
'summary': 'Automatically update Odoo modules', 'summary': 'Automatically update Odoo modules',
'version': '10.0.1.0.1',
'version': '11.0.1.0.0',
'category': 'Extra Tools', 'category': 'Extra Tools',
'website': 'https://odoo-community.org/', 'website': 'https://odoo-community.org/',
'author': 'LasLabs, ' 'author': 'LasLabs, '
'Juan José Scarafía, ' 'Juan José Scarafía, '
'Tecnativa, '
'Odoo Community Association (OCA)', 'Odoo Community Association (OCA)',
'license': 'LGPL-3', 'license': 'LGPL-3',
'application': False, 'application': False,

11
module_auto_update/data/cron_data.xml

@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 LasLabs - Dave Lasley
Copyright 2017 Tecnativa - Jairo Llopis
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). -->
<odoo noupdate="1"> <odoo noupdate="1">
<record model="ir.cron" id="module_check_upgrades_cron"> <record model="ir.cron" id="module_check_upgrades_cron">
<field name="name">Perform Module Upgrades</field> <field name="name">Perform Module Upgrades</field>
@ -8,8 +12,9 @@
<field name="interval_type">days</field> <field name="interval_type">days</field>
<field name="numbercall">-1</field> <field name="numbercall">-1</field>
<field name="nextcall" eval="(DateTime.now() + timedelta(days= +1)).strftime('%Y-%m-%d 3:00:00')"/> <field name="nextcall" eval="(DateTime.now() + timedelta(days= +1)).strftime('%Y-%m-%d 3:00:00')"/>
<field name="model">base.module.upgrade</field>
<field name="function">upgrade_module</field>
<field name="args" eval="'()'"/>
<field name="model_id" ref="base.model_base_module_upgrade"/>
<field name="state">code</field>
<field name="code">model.upgrade_module()</field>
</record> </record>
</odoo> </odoo>

1
module_auto_update/hooks.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc. # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

2
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). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from . import module from . import module

1
module_auto_update/models/module.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc. # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

2
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). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from . import test_module from . import test_module

1
module_auto_update/tests/test_module.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc. # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

1
module_auto_update/tests/test_module_upgrade.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc. # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

2
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). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from . import module_upgrade from . import module_upgrade

2
module_auto_update/wizards/module_upgrade.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc. # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
@ -9,6 +8,7 @@ class ModuleUpgrade(models.TransientModel):
_inherit = 'base.module.upgrade' _inherit = 'base.module.upgrade'
@api.model @api.model
@api.returns('ir.module.module')
def get_module_list(self): def get_module_list(self):
"""Set modules to upgrade searching by their dir checksum.""" """Set modules to upgrade searching by their dir checksum."""
Module = self.env["ir.module.module"] Module = self.env["ir.module.module"]

Loading…
Cancel
Save