Skip to content

Commit

Permalink
[FIX] l10n_it_riba: add migration for module name
Browse files Browse the repository at this point in the history
  • Loading branch information
odooNextev committed Nov 7, 2023
1 parent b7d12ca commit e051d92
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions l10n_it_riba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models, wizard, report
from .hooks import pre_absorb_old_module
6 changes: 6 additions & 0 deletions l10n_it_riba/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,11 @@
"views/wizard_presentation.xml",
],
"demo": ["demo/riba_demo.xml"],
"external_dependencies": {
"python": [
"openupgradelib",
],
},
"pre_init_hook": "pre_absorb_old_module",
"installable": True,
}
14 changes: 14 additions & 0 deletions l10n_it_riba/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade


def pre_absorb_old_module(cr):
if openupgrade.is_module_installed(cr, "l10n_it_ricevute_bancarie"):
openupgrade.update_module_names(
cr,
[
("l10n_it_ricevute_bancarie", "l10n_it_riba"),
],
merge_modules=True,
)

0 comments on commit e051d92

Please sign in to comment.