diff options
| author | Raphael Collet <rco@openerp.com> | 2016-08-30 15:03:37 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2016-09-01 13:43:45 +0200 |
| commit | a7445b4053f2e31866b5f608619dfb3859fe0a68 (patch) | |
| tree | 137c4627ae14925efc83d2cb1a85df36f32b5efe /addons/l10n_hr | |
| parent | 3019f4a48d465fc36e7edef4622e1317751fbff8 (diff) | |
[REF] registry: move functionalities from `RegistryManager` to `Registry`
The API of `Registry` has been modified as follows:
- `Registry(name)` returns the registry of the given database
- `Registry.new(name)` forces the creation of a new `Registry` object
- `Registry.delete(name)` discards the given registry
- `Registry.delete_all()` discards all registries
- `registry.setup_signaling()` initializes the signaling for `registry`
- `registry.check_signaling()` returns an up-to-date `registry`
- `registry.signal_registry_change()` notifies that `registry` has changed
- `registry.signal_caches_change()` notifies potential cache invalidation
Diffstat (limited to 'addons/l10n_hr')
| -rw-r--r-- | addons/l10n_hr/migrations/13.0/post-migrate_tags_on_taxes.py | 6 | ||||
| -rw-r--r-- | addons/l10n_hr/migrations/13.0/pre-set_tags_and_taxes_updatable.py | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/addons/l10n_hr/migrations/13.0/post-migrate_tags_on_taxes.py b/addons/l10n_hr/migrations/13.0/post-migrate_tags_on_taxes.py index 7de1ed4782a..404cdd185d4 100644 --- a/addons/l10n_hr/migrations/13.0/post-migrate_tags_on_taxes.py +++ b/addons/l10n_hr/migrations/13.0/post-migrate_tags_on_taxes.py @@ -1,6 +1,8 @@ -from odoo.modules.registry import RegistryManager +# -*- coding: utf-8 -*- + +import odoo def migrate(cr, version): - registry = RegistryManager.get(cr.dbname) + registry = odoo.registry(cr.dbname) from odoo.addons.account.models.chart_template import migrate_tags_on_taxes migrate_tags_on_taxes(cr, registry) diff --git a/addons/l10n_hr/migrations/13.0/pre-set_tags_and_taxes_updatable.py b/addons/l10n_hr/migrations/13.0/pre-set_tags_and_taxes_updatable.py index 686e673f9a5..7bbc19a9352 100644 --- a/addons/l10n_hr/migrations/13.0/pre-set_tags_and_taxes_updatable.py +++ b/addons/l10n_hr/migrations/13.0/pre-set_tags_and_taxes_updatable.py @@ -1,6 +1,8 @@ -from odoo.modules.registry import RegistryManager +# -*- coding: utf-8 -*- + +import odoo def migrate(cr, version): - registry = RegistryManager.get(cr.dbname) + registry = odoo.registry(cr.dbname) from odoo.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_hr') |
