Browse Source
Merge pull request #1505 from brainbeanapps/12.0-imp-module_auto_update-ui_button
[12.0][IMP] module_auto_update: UI button
pull/1530/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with
55 additions and
13 deletions
-
module_auto_update/README.rst
-
module_auto_update/__init__.py
-
module_auto_update/__manifest__.py
-
module_auto_update/addon_hash.py
-
module_auto_update/hooks.py
-
module_auto_update/models/__init__.py
-
module_auto_update/models/module.py
-
module_auto_update/readme/USAGE.rst
-
module_auto_update/static/description/index.html
-
module_auto_update/tests/__init__.py
-
module_auto_update/tests/test_addon_hash.py
-
module_auto_update/tests/test_module.py
-
module_auto_update/views/ir_module_module.xml
|
@ -63,7 +63,11 @@ 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 |
|
|
where one is sure all modules on disk are installed and up-to-date in the |
|
|
database. |
|
|
database. |
|
|
|
|
|
|
|
|
An easy way to invoke this upgrade mechanism is by issuing the following |
|
|
|
|
|
|
|
|
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: |
|
|
in an Odoo shell session: |
|
|
|
|
|
|
|
|
.. code-block:: python |
|
|
.. code-block:: python |
|
|
|
@ -1,4 +1,4 @@ |
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
from . import models |
|
|
from . import models |
|
|
from .hooks import uninstall_hook |
|
|
from .hooks import uninstall_hook |
|
@ -1,10 +1,11 @@ |
|
|
# Copyright 2017 LasLabs Inc. |
|
|
# Copyright 2017 LasLabs Inc. |
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com) |
|
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
'name': 'Module Auto Update', |
|
|
'name': 'Module Auto Update', |
|
|
'summary': 'Automatically update Odoo modules', |
|
|
'summary': 'Automatically update Odoo modules', |
|
|
'version': '12.0.2.0.4', |
|
|
|
|
|
|
|
|
'version': '12.0.2.0.5', |
|
|
'category': 'Extra Tools', |
|
|
'category': 'Extra Tools', |
|
|
'website': 'https://github.com/OCA/server-tools', |
|
|
'website': 'https://github.com/OCA/server-tools', |
|
|
'author': 'LasLabs, ' |
|
|
'author': 'LasLabs, ' |
|
@ -18,5 +19,8 @@ |
|
|
'depends': [ |
|
|
'depends': [ |
|
|
'base', |
|
|
'base', |
|
|
], |
|
|
], |
|
|
|
|
|
'data': [ |
|
|
|
|
|
'views/ir_module_module.xml', |
|
|
|
|
|
], |
|
|
'development_status': 'Production/Stable', |
|
|
'development_status': 'Production/Stable', |
|
|
} |
|
|
} |
|
@ -1,5 +1,5 @@ |
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
from fnmatch import fnmatch |
|
|
from fnmatch import fnmatch |
|
|
import hashlib |
|
|
import hashlib |
|
|
|
@ -1,5 +1,5 @@ |
|
|
# 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 (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
from odoo import SUPERUSER_ID, api |
|
|
from odoo import SUPERUSER_ID, api |
|
|
|
|
|
|
|
|
|
@ -1,3 +1,3 @@ |
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
from . import module |
|
|
from . import module |
|
@ -1,6 +1,6 @@ |
|
|
# Copyright 2017 LasLabs Inc. |
|
|
# Copyright 2017 LasLabs Inc. |
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
import json |
|
|
import json |
|
|
import logging |
|
|
import logging |
|
|
|
@ -10,7 +10,11 @@ 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 |
|
|
where one is sure all modules on disk are installed and up-to-date in the |
|
|
database. |
|
|
database. |
|
|
|
|
|
|
|
|
An easy way to invoke this upgrade mechanism is by issuing the following |
|
|
|
|
|
|
|
|
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: |
|
|
in an Odoo shell session: |
|
|
|
|
|
|
|
|
.. code-block:: python |
|
|
.. code-block:: python |
|
|
|
@ -410,7 +410,10 @@ This is by design, priviledging safety. Should this be an issue, |
|
|
the method <tt class="docutils literal">_save_installed_checksums</tt> can be invoked in a situation |
|
|
the method <tt class="docutils literal">_save_installed_checksums</tt> can be invoked in a situation |
|
|
where one is sure all modules on disk are installed and up-to-date in the |
|
|
where one is sure all modules on disk are installed and up-to-date in the |
|
|
database.</p> |
|
|
database.</p> |
|
|
<p>An easy way to invoke this upgrade mechanism is by issuing the following |
|
|
|
|
|
|
|
|
<p>To invoke the upgrade mechanism, navigate to <em>Apps</em> menu and use the |
|
|
|
|
|
<em>Auto-Upgrade Modules</em> button, available only in developer mode. Restarting |
|
|
|
|
|
the Odoo instance is highly recommended to minify risk of any possible issues.</p> |
|
|
|
|
|
<p>Another easy way to invoke this upgrade mechanism is by issuing the following |
|
|
in an Odoo shell session:</p> |
|
|
in an Odoo shell session:</p> |
|
|
<pre class="code python literal-block"> |
|
|
<pre class="code python literal-block"> |
|
|
<span class="n">env</span><span class="p">[</span><span class="s1">'ir.module.module'</span><span class="p">]</span><span class="o">.</span><span class="n">upgrade_changed_checksum</span><span class="p">()</span> |
|
|
<span class="n">env</span><span class="p">[</span><span class="s1">'ir.module.module'</span><span class="p">]</span><span class="o">.</span><span class="n">upgrade_changed_checksum</span><span class="p">()</span> |
|
|
|
@ -1,4 +1,4 @@ |
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
from . import test_addon_hash |
|
|
from . import test_addon_hash |
|
|
from . import test_module |
|
|
from . import test_module |
|
@ -1,5 +1,5 @@ |
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
import os |
|
|
import os |
|
|
import unittest |
|
|
import unittest |
|
|
|
@ -1,6 +1,6 @@ |
|
|
# Copyright 2017 LasLabs Inc. |
|
|
# Copyright 2017 LasLabs Inc. |
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
import os |
|
|
import os |
|
|
import tempfile |
|
|
import tempfile |
|
|
|
@ -0,0 +1,27 @@ |
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?> |
|
|
|
|
|
<odoo> |
|
|
|
|
|
<!-- |
|
|
|
|
|
Copyright 2018 Brainbean Apps (https://brainbeanapps.com) |
|
|
|
|
|
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
|
|
<record id="ir_module_module_upgrade_changed_checksum" model="ir.actions.server"> |
|
|
|
|
|
<field name="name">Auto-Upgrade Modules</field> |
|
|
|
|
|
<field name="type">ir.actions.server</field> |
|
|
|
|
|
<field name="model_id" ref="base.model_ir_module_module"/> |
|
|
|
|
|
<field name="state">code</field> |
|
|
|
|
|
<field name="code"> |
|
|
|
|
|
action = model.upgrade_changed_checksum() |
|
|
|
|
|
</field> |
|
|
|
|
|
</record> |
|
|
|
|
|
|
|
|
|
|
|
<menuitem |
|
|
|
|
|
name="Auto-Upgrade Modules" |
|
|
|
|
|
action="ir_module_module_upgrade_changed_checksum" |
|
|
|
|
|
id="menu_ir_module_module_upgrade_changed_checksum" |
|
|
|
|
|
groups="base.group_no_one" |
|
|
|
|
|
parent="base.menu_management" |
|
|
|
|
|
sequence="45" |
|
|
|
|
|
icon="fa-exchange"/> |
|
|
|
|
|
|
|
|
|
|
|
</odoo> |