Browse Source

[MIG] module_auto_update: Migrate to v11

pull/1118/head
Jairo Llopis 7 years ago
committed by Pedro M. Baeza
parent
commit
5bef5cc209
  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
  13. 1
      requirements.txt

7
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 <brent.hughes@laslabs.com>
* 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.

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).
from . import models

4
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,

11
module_auto_update/data/cron_data.xml

@ -1,4 +1,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">
<record model="ir.cron" id="module_check_upgrades_cron">
<field name="name">Perform Module Upgrades</field>
@ -8,8 +12,9 @@
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<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>
</odoo>

1
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).

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).
from . import module

1
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).

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).
from . import test_module

1
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).

1
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).

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).
from . import module_upgrade

2
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"]

1
requirements.txt

@ -0,0 +1 @@
checksumdir
Loading…
Cancel
Save