Skip to content

Commit

Permalink
[MIG] remove l10n_br_nfe.import_xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mileo committed Jan 17, 2025
1 parent 5456799 commit 9b9419f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion l10n_br_nfe/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"maintainers": ["rvalyi", "renatonlima"],
"website": "https://github.com/OCA/l10n-brazil",
"development_status": "Beta",
"version": "14.0.19.3.1",
"version": "14.0.20.0.0",
"depends": [
"l10n_br_fiscal_edi",
"l10n_br_fiscal_certificate",
Expand Down
24 changes: 24 additions & 0 deletions l10n_br_nfe/migrations/14.0.20.0.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2024 KMEE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


def delete_model(cr, model_name):
openupgrade.logged_query(
cr,
"""
DELETE FROM ir_model_access
WHERE model_id = (SELECT id FROM ir_model where model = '%s')
"""
% model_name,
)
openupgrade.logged_query(
cr, "DELETE FROM ir_model_fields WHERE model = '%s'" % model_name
)
openupgrade.logged_query(cr, "DELETE FROM ir_model WHERE model = '%s'" % model_name)


@openupgrade.migrate()
def migrate(env, version):
delete_model(env.cr, "l10n_br_nfe.import_xml")

0 comments on commit 9b9419f

Please sign in to comment.