Skip to content

Commit

Permalink
[FIX]l10n_it_vat_statement_communication fix ...dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
matteoopenf committed Sep 5, 2024
1 parent dfec662 commit 8854e04
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion l10n_it_vat_statement_communication/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "ITA - Comunicazione liquidazione IVA",
"summary": "Comunicazione liquidazione IVA ed esportazione file xml"
"conforme alle specifiche dell'Agenzia delle Entrate",
"version": "16.0.1.0.0",
"version": "16.0.1.1.0",
"category": "Account",
"author": "Openforce di Camilli Alessandro, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import logging

from openupgradelib import openupgrade

_logger = logging.getLogger(__name__)


@openupgrade.migrate()
def migrate(env, version):
if not version:
return

rm_old_vat_communication_multi_company_rule(env)


def rm_old_vat_communication_multi_company_rule(env):
_logger.info(
"Migration of l10n_it_vat_statement_communication - search for"
" previous multi company rule for 'comunicazione.liquidazione' model"
)
module = "l10n_it_vat_statement_communication"
rule_xml_id = "comunucazione_liquidazione_iva_multi_company"
old_vat_comm_multi_company_rule_ref = env.ref(
f"{module}.{rule_xml_id}", raise_if_not_found=False
)

if not old_vat_comm_multi_company_rule_ref:
# avoid unlink not existent record
_logger.warning(
"Migration of l10n_it_vat_statement_communication - previous"
" multi company rule for 'comunicazione.liquidazione' model not"
" found"
)
return

_logger.info(
"Migration of l10n_it_vat_statement_communication - unlink"
" previous multi company rule for 'comunicazione.liquidazione' model"
)
old_vat_comm_multi_company_rule_ref.unlink()

0 comments on commit 8854e04

Please sign in to comment.