From d3b3c41d62f543fff606ef802988e8f9b9030564 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 15 Nov 2021 21:08:06 +0100 Subject: [PATCH] [OU-ADD] stock_landed_costs: Migration scripts TT30775 --- .../9.0.1.1/openupgrade_analysis_work.txt | 15 +++++++++++++++ .../migrations/9.0.1.1/post-migration.py | 10 ++++++++++ openerp/openupgrade/doc/source/modules80-90.rst | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 addons/stock_landed_costs/migrations/9.0.1.1/openupgrade_analysis_work.txt create mode 100644 addons/stock_landed_costs/migrations/9.0.1.1/post-migration.py diff --git a/addons/stock_landed_costs/migrations/9.0.1.1/openupgrade_analysis_work.txt b/addons/stock_landed_costs/migrations/9.0.1.1/openupgrade_analysis_work.txt new file mode 100644 index 000000000000..a7c49c49d02b --- /dev/null +++ b/addons/stock_landed_costs/migrations/9.0.1.1/openupgrade_analysis_work.txt @@ -0,0 +1,15 @@ +---Fields in module 'stock_landed_costs'--- +stock_landed_costs / stock.landed.cost / message_follower_ids (many2many): not a function anymore +stock_landed_costs / stock.landed.cost / message_follower_ids (many2many): relation is now 'mail.followers' ('res.partner') +stock_landed_costs / stock.landed.cost / message_follower_ids (many2many): type is now 'one2many' ('many2many') +# NOTHING TO DO: mail stuff already handled + +---XML records in module 'stock_landed_costs'--- +DEL ir.sequence.type: stock_landed_costs.seq_type_stock_landed_costs +# DONE: post-migration: Remove safely noupdate=1 record + +DEL ir.ui.menu: stock_landed_costs.menu_stock_landed_cost_main +# NOTHING TO DO: noupdate=0 record + +NEW res.groups: base.group_user +# NOTHING TO DO: Fake report diff --git a/addons/stock_landed_costs/migrations/9.0.1.1/post-migration.py b/addons/stock_landed_costs/migrations/9.0.1.1/post-migration.py new file mode 100644 index 000000000000..3642c6a82c45 --- /dev/null +++ b/addons/stock_landed_costs/migrations/9.0.1.1/post-migration.py @@ -0,0 +1,10 @@ +# Copyright 2021 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +@openupgrade.migrate(use_env=True) +def migrate(env, version): + openupgrade.delete_records_safely_by_xml_id( + env, [("stock_landed_costs.seq_type_stock_landed_costs")], + ) diff --git a/openerp/openupgrade/doc/source/modules80-90.rst b/openerp/openupgrade/doc/source/modules80-90.rst index a6a3940cf906..6ec848593778 100644 --- a/openerp/openupgrade/doc/source/modules80-90.rst +++ b/openerp/openupgrade/doc/source/modules80-90.rst @@ -530,7 +530,7 @@ missing in the new release are marked with |del|. +----------------------------------------+------------------------------------------+ | |del| stock_invoice_directly | | +----------------------------------------+------------------------------------------+ -|stock_landed_costs | | +|stock_landed_costs | Done | +----------------------------------------+------------------------------------------+ |stock_picking_wave | Nothing to do | +----------------------------------------+------------------------------------------+