Skip to content

Commit

Permalink
[FIX] l10n_it_vat_payability: replace script migration by pre_init_hook
Browse files Browse the repository at this point in the history
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
tafaRU authored and are-agilebg committed May 10, 2023
1 parent d002ffa commit c4ea6e0
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 24 deletions.
1 change: 1 addition & 0 deletions l10n_it_vat_payability/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Contributors
* Lorenzo Battistini <[email protected]>
* Gianmarco Conte <[email protected]>
* Giuseppe Borruso - Dinamiche Aziendali srl <[email protected]>
* Alex Comba <[email protected]>

Maintainers
~~~~~~~~~~~
Expand Down
27 changes: 27 additions & 0 deletions l10n_it_vat_payability/__init__.py
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,
)
3 changes: 2 additions & 1 deletion l10n_it_vat_payability/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "ITA - Esigibilità IVA",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"development_status": "Beta",
"category": "Localization/Italy",
"author": "Openforce di Camilli Alessandro, Odoo Community Association (OCA)",
Expand All @@ -17,4 +17,5 @@
"views/account_view.xml",
],
"installable": True,
"pre_init_hook": "rename_old_italian_module",
}
23 changes: 0 additions & 23 deletions l10n_it_vat_payability/migrations/14.0.1.0.0/pre-migrate.py

This file was deleted.

1 change: 1 addition & 0 deletions l10n_it_vat_payability/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
* Lorenzo Battistini <[email protected]>
* Gianmarco Conte <[email protected]>
* Giuseppe Borruso - Dinamiche Aziendali srl <[email protected]>
* Alex Comba <[email protected]>
1 change: 1 addition & 0 deletions l10n_it_vat_payability/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ <h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<li>Lorenzo Battistini &lt;<a class="reference external" href="mailto:lorenzo.battistini&#64;agilebg.com">lorenzo.battistini&#64;agilebg.com</a>&gt;</li>
<li>Gianmarco Conte &lt;<a class="reference external" href="mailto:gconte&#64;dinamicheaziendali.it">gconte&#64;dinamicheaziendali.it</a>&gt;</li>
<li>Giuseppe Borruso - Dinamiche Aziendali srl &lt;<a class="reference external" href="mailto:gborruso&#64;dinamicheaziendali.it">gborruso&#64;dinamicheaziendali.it</a>&gt;</li>
<li>Alex Comba &lt;<a class="reference external" href="mailto:alex.comba&#64;agilebg.com">alex.comba&#64;agilebg.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down

0 comments on commit c4ea6e0

Please sign in to comment.