Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions base_module_quick_update/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

========================
Base Module Quick Update
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c4b04defc7ec971db19abc414e467dc5c83a01ec7c8091551cc02340206cfe0d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/16.0/base_module_quick_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-16-0/server-tools-16-0-base_module_quick_update
:alt: Translate me on Weblate
.. |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|

This module adds a **Quick upgrade** action on Apps — a fast upgrade of
the selected module without cascading upgrades of the installed modules
that depend on it.

The regular **Upgrade** action keeps the standard Odoo behavior: the
selected module is upgraded together with the installed modules that
depend on it.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

In standard Odoo, clicking **Upgrade** on a module also queues all
installed modules that depend on it. On large databases and during
frequent development this slows things down: often you only need to
upgrade a single module, without cascading upgrades of its dependents.

A way is needed to start an upgrade for the selected module only (and
install any missing dependencies if they are not yet installed), without
adding reverse-dependencies to the upgrade.

Configuration
=============

This module works out of the box and requires no configuration.

The **Quick upgrade** action is restricted to the *Administration /
Settings* (``base.group_system``) group, the same as the standard
**Upgrade** action.

Usage
=====

1. Install the ``base_module_quick_update`` module.
2. Open **Apps** and the card of the desired installed module.
3. Click **Quick upgrade** (on the form view and/or on the kanban /
module action menu). |Quick upgrade button|
4. Wait for the upgrade to apply to the selected module only (without
mass-upgrading dependents).

For comparison: the regular **Upgrade** button still upgrades the module
together with the installed modules that depend on it.

.. |Quick upgrade button| image:: https://raw.githubusercontent.com/OCA/server-tools/16.0/base_module_quick_update/static/description/img/quick_upgrade_button.png

Changelog
=========



Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_module_quick_update%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* XXP

Contributors
------------

- XXP <xxp-odoo.com>

- Project Manager Mikhail Lapin
- Developer Anton Balmakov

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 <https://github.com/OCA/server-tools/tree/16.0/base_module_quick_update>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions base_module_quick_update/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2026 XXP
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
21 changes: 21 additions & 0 deletions base_module_quick_update/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2026 XXP
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Base Module Quick Update",
"version": "16.0.1.0.0",
"summary": "Adds a quick upgrade for the selected module without "
"cascading upgrades of modules that depend on it.",
"author": "XXP, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"license": "AGPL-3",
"category": "Technical Settings",
"depends": [
"base",
],
"data": [
"views/ir_module_views.xml",
],
"installable": True,
"application": False,
}
4 changes: 4 additions & 0 deletions base_module_quick_update/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2026 XXP
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import ir_module
69 changes: 69 additions & 0 deletions base_module_quick_update/models/ir_module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Copyright (C) 2026 XXP
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

import logging

from odoo import _, models
from odoo.exceptions import UserError

from odoo.addons.base.models.ir_module import ACTION_DICT, assert_log_admin_access

_logger = logging.getLogger(__name__)


class IrModuleModule(models.Model):
_inherit = "ir.module.module"

@assert_log_admin_access
def button_quick_upgrade(self):
"""
Upgrade the selected modules. Unlike the standard method, this mode
does not automatically upgrade other modules that depend on them (downstream).
However, any missing required dependencies (upstream) will still be installed
to ensure the module upgrades correctly.
"""

if not self:
return
self.update_list()

for module in self:
if module.state not in ("installed", "to upgrade"):
raise UserError(
_("Can not upgrade module '%s'. It is not installed.")
% (module.name,)
)
if self.get_module_info(module.name).get("installable", True):
self.check_external_dependencies(module.name, "to upgrade")

self.write({"state": "to upgrade"})

to_install = []
for module in self:
if not self.get_module_info(module.name).get("installable", True):
continue
for dep in module.dependencies_id:
if dep.state == "unknown":
raise UserError(
_(
"You try to upgrade the module %(module)s that "
"depends on the module: %(dependency)s.\nBut this "
"module is not available in your system."
)
% {"module": module.name, "dependency": dep.name}
)
if dep.state == "uninstalled":
to_install += self.search([("name", "=", dep.name)]).ids

self.browse(to_install).button_install()
return dict(ACTION_DICT, name=_("Apply Schedule Upgrade"))

@assert_log_admin_access
def button_immediate_quick_upgrade(self):
"""Immediately upgrade the selected module(s) without cascading to the
installed dependents; returns the next res.config action to execute.
"""
_logger.info("User #%d triggered quick module upgrade", self.env.uid)
return self._button_immediate_function(
self.env.registry[self._name].button_quick_upgrade
)
4 changes: 4 additions & 0 deletions base_module_quick_update/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module works out of the box and requires no configuration.

The **Quick upgrade** action is restricted to the *Administration / Settings*
(`base.group_system`) group, the same as the standard **Upgrade** action.
8 changes: 8 additions & 0 deletions base_module_quick_update/readme/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
In standard Odoo, clicking **Upgrade** on a module also queues all installed
modules that depend on it. On large databases and during frequent development
this slows things down: often you only need to upgrade a single module, without
cascading upgrades of its dependents.

A way is needed to start an upgrade for the selected module only (and install
any missing dependencies if they are not yet installed), without adding
reverse-dependencies to the upgrade.
4 changes: 4 additions & 0 deletions base_module_quick_update/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- XXP \<xxp-odoo.com\>

- Project Manager Mikhail Lapin
- Developer Anton Balmakov
6 changes: 6 additions & 0 deletions base_module_quick_update/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module adds a **Quick upgrade** action on Apps — a fast upgrade of the
selected module without cascading upgrades of the installed modules that depend
on it.

The regular **Upgrade** action keeps the standard Odoo behavior: the selected
module is upgraded together with the installed modules that depend on it.
Empty file.
10 changes: 10 additions & 0 deletions base_module_quick_update/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
1. Install the `base_module_quick_update` module.
2. Open **Apps** and the card of the desired installed module.
3. Click **Quick upgrade** (on the form view and/or on the kanban / module
action menu).
![Quick upgrade button](../static/description/img/quick_upgrade_button.png)
4. Wait for the upgrade to apply to the selected module only (without
mass-upgrading dependents).

For comparison: the regular **Upgrade** button still upgrades the module
together with the installed modules that depend on it.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading