diff options
| author | fw-bot <otis@odoo.com> | 2020-01-24 17:29:50 +0000 |
|---|---|---|
| committer | Julien Castiaux <juc@odoo.com> | 2020-01-28 14:16:02 +0000 |
| commit | 48b51e67c93d16c6030edaaaf36d4fbcafc4b3b4 (patch) | |
| tree | b6c8edb75f74c477ee7356bf322317cf0d52b597 /odoo/__init__.py | |
| parent | f06397b2e68b8cfb1de274e4a96b69a78a85339c (diff) | |
[FIX] module.py: --upgrades-paths dynamic hooks
Migration have long been only accessible thanks to a symlink from
`odoo.base.maintenance` to our private migration repository. Thank to
the change of bbb1a8f it is now possible to give a load the
migrations scripts from a path given in options.
The `initialize_sys_path` function has been updated to hooks the new
paths or the legacy symlink and to provide aliases to the previous
import logic to ensure backward compatibility.
`odoo.upgrades` (`community/odoo/upgrades`) is a new namespace that hook
all `--upgrades-paths` directories or the
`community/odoo/base/maintenance/migrations` symlink if none is previded.
`odoo.addons.base.maintenance.migrations` has been made an alias to
`odoo.upgrades`.
The `odoo.upgrades` is the desired method for accessing migrations
scripts and should be used by all new scripts.
closes odoo/odoo#44117
Task: 2178274
X-original-commit: d963cc05acd882729c4eb5ab940dae2a2197e55a
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'odoo/__init__.py')
| -rw-r--r-- | odoo/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/odoo/__init__.py b/odoo/__init__.py index 8eb764a712d..804db5d937c 100644 --- a/odoo/__init__.py +++ b/odoo/__init__.py @@ -106,6 +106,7 @@ def registry(database_name=None): #---------------------------------------------------------- # Imports #---------------------------------------------------------- +from . import upgrades # this namespace must be imported first from . import addons from . import conf from . import loglevels |
