forked from OCA/l10n-italy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] l10n_it_vat_payability: replace script migration by pre_init_hook
In this way we fix OCA#2220 (comment) Note: OCA#2220 (comment) does not apply as in the case at hand there aren't models involved in the migration.
- Loading branch information
Showing
6 changed files
with
31 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,29 @@ | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
# Copyright 2021 Alex Comba - Agile Business Group | ||
|
||
from . import models | ||
|
||
from openupgradelib import openupgrade | ||
|
||
|
||
def rename_old_italian_module(cr): | ||
|
||
if not openupgrade.is_module_installed(cr, "l10n_it_esigibilita_iva"): | ||
return | ||
|
||
openupgrade.rename_xmlids( | ||
cr, | ||
[ | ||
( | ||
"l10n_it_esigibilita_iva.view_tax_code_esigibilita_form", | ||
"l10n_it_vat_payability.view_tax_code_payability_form", | ||
), | ||
], | ||
) | ||
openupgrade.update_module_names( | ||
cr, | ||
[ | ||
("l10n_it_esigibilita_iva", "l10n_it_vat_payability"), | ||
], | ||
merge_modules=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,5 @@ | |
"views/account_view.xml", | ||
], | ||
"installable": True, | ||
"pre_init_hook": "rename_old_italian_module", | ||
} |
23 changes: 0 additions & 23 deletions
23
l10n_it_vat_payability/migrations/14.0.1.0.0/pre-migrate.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters