From d46cf324d1424c097d73921e9bc52982200d00f7 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 13 Jan 2023 19:05:04 +0100 Subject: [PATCH] [OU-ADD] sale_project: Migration scripts TT35781 --- docsource/modules140-150.rst | 2 +- .../scripts/sale_purchase/15.0.1.0/pre-migration.py | 11 +++++++++++ .../sale_purchase/15.0.1.0/upgrade_analysis_work.txt | 8 ++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/sale_purchase/15.0.1.0/pre-migration.py create mode 100644 openupgrade_scripts/scripts/sale_purchase/15.0.1.0/upgrade_analysis_work.txt diff --git a/docsource/modules140-150.rst b/docsource/modules140-150.rst index f2e2547160bb..15c15ecac35f 100644 --- a/docsource/modules140-150.rst +++ b/docsource/modules140-150.rst @@ -668,7 +668,7 @@ Module coverage 14.0 -> 15.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | sale_product_matrix | | | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| sale_project | | | +| sale_project | Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | |new| sale_project_account | | | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/sale_purchase/15.0.1.0/pre-migration.py b/openupgrade_scripts/scripts/sale_purchase/15.0.1.0/pre-migration.py new file mode 100644 index 000000000000..9223c4fa37f7 --- /dev/null +++ b/openupgrade_scripts/scripts/sale_purchase/15.0.1.0/pre-migration.py @@ -0,0 +1,11 @@ +# Copyright 2023 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + # Disappeared constraint + openupgrade.delete_sql_constraint_safely( + env, "sale_project", "project_project", "sale_order_required_if_sale_line" + ) diff --git a/openupgrade_scripts/scripts/sale_purchase/15.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/sale_purchase/15.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..02ae845105ba --- /dev/null +++ b/openupgrade_scripts/scripts/sale_purchase/15.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,8 @@ +---Models in module 'sale_purchase'--- +---Fields in module 'sale_purchase'--- +---XML records in module 'sale_purchase'--- +---nothing has changed in this module-- +# NOTHING TO DO + +--- Not logged --- +# DONE: pre-migration: Drop constraint sale_order_required_if_sale_line \ No newline at end of file