Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][OU-ADD] account_edi: Migration to 17.0 #4587

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docsource/modules160-170.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Module coverage 16.0 -> 17.0
+---------------------------------------------------+----------------------+-------------------------------------------------+
| account_debit_note | | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| account_edi | | |
| account_edi | Done | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| account_edi_proxy_client | | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down Expand Up @@ -70,7 +70,7 @@ Module coverage 16.0 -> 17.0
+---------------------------------------------------+----------------------+-------------------------------------------------+
| barcodes_gs1_nomenclature | |No DB layout changes. |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| base | | |
| base | Done | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| base_address_extended | | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down Expand Up @@ -864,7 +864,7 @@ Module coverage 16.0 -> 17.0
+---------------------------------------------------+----------------------+-------------------------------------------------+
| utm | | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| web | | |
| web | Nothing to do | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| web_editor | | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(env, "account_edi", "17.0.1.0/noupdate_changes.xml")
21 changes: 21 additions & 0 deletions openupgrade_scripts/scripts/account_edi/17.0.1.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2023 Viindoo - Nguyễn Đại Dương
# Copyright 2024 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade


def _remove_table_constraints(env):
openupgrade.delete_sql_constraint_safely(
env,
"account_edi",
"account_edi_document",
"account_edi_document_unique_edi_document_by_move_by_format",
)
openupgrade.delete_sql_constraint_safely(
env, "account_edi", "account_edi_format", "account_edi_format_unique_code"
)


@openupgrade.migrate()
def migrate(env, version):
_remove_table_constraints(env)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---Models in module 'account_edi'---

---Fields in module 'account_edi'---
---XML records in module 'account_edi'---
DEL ir.actions.act_window: account_edi.action_open_payment_edi_documents
# NOTHING TO DO

DEL ir.model.constraint: account_edi.constraint_account_edi_document_unique_edi_document_by_move_by_format
DEL ir.model.constraint: account_edi.constraint_account_edi_format_unique_code
# DONE (pre-migration): safely deleting the constraints

DEL ir.ui.view: account_edi.view_payment_form_inherit
# NOTHING TO DO
Loading