From 4c49f9ff87282fe222619ef5ec800ddaf5a6a301 Mon Sep 17 00:00:00 2001 From: Tran Truong Son Date: Sat, 1 Jul 2023 17:04:50 +0700 Subject: [PATCH] [OU-ADD] purchase_requisition: safety remove no update xml record --- docsource/modules150-160.rst | 2 +- .../16.0.0.1/post-migration.py | 9 ++++ .../16.0.0.1/upgrade_analysis_work.txt | 43 +++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/purchase_requisition/16.0.0.1/post-migration.py create mode 100644 openupgrade_scripts/scripts/purchase_requisition/16.0.0.1/upgrade_analysis_work.txt diff --git a/docsource/modules150-160.rst b/docsource/modules150-160.rst index 63c0d46657fc..97938d4e6930 100644 --- a/docsource/modules150-160.rst +++ b/docsource/modules150-160.rst @@ -664,7 +664,7 @@ Module coverage 15.0 -> 16.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | purchase_product_matrix | |No DB layout changes. | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| purchase_requisition | | | +| purchase_requisition |Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | purchase_requisition_stock | | | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/purchase_requisition/16.0.0.1/post-migration.py b/openupgrade_scripts/scripts/purchase_requisition/16.0.0.1/post-migration.py new file mode 100644 index 000000000000..72288f29fa25 --- /dev/null +++ b/openupgrade_scripts/scripts/purchase_requisition/16.0.0.1/post-migration.py @@ -0,0 +1,9 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.delete_records_safely_by_xml_id( + env, + ["purchase_requisition.seq_purchase_tender", "purchase_requisition.type_multi"], + ) diff --git a/openupgrade_scripts/scripts/purchase_requisition/16.0.0.1/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/purchase_requisition/16.0.0.1/upgrade_analysis_work.txt new file mode 100644 index 000000000000..a311c29b35ba --- /dev/null +++ b/openupgrade_scripts/scripts/purchase_requisition/16.0.0.1/upgrade_analysis_work.txt @@ -0,0 +1,43 @@ +---Models in module 'purchase_requisition'--- +new model purchase.order.group +new model purchase.requisition.alternative.warning [transient] +new model purchase.requisition.create.alternative [transient] +# NOTHING TO DO + +---Fields in module 'purchase_requisition'--- +purchase_requisition / product.template / purchase_requisition (selection): DEL selection_keys: ['rfq', 'tenders'] +purchase_requisition / purchase.order / purchase_group_id (many2one) : NEW relation: purchase.order.group +purchase_requisition / purchase.order.group / order_ids (one2many) : NEW relation: purchase.order +# NOTHING TO DO + +purchase_requisition / purchase.requisition.line / account_analytic_id (many2one): DEL relation: account.analytic.account +purchase_requisition / purchase.requisition.line / analytic_distribution (json) : NEW hasdefault: compute +purchase_requisition / purchase.requisition.line / analytic_distribution_search (json): NEW +purchase_requisition / purchase.requisition.line / analytic_precision (integer) : NEW hasdefault: default +# DONE pre-migration. use _dynamic_fast_fill_analytic_distribution_when_inherit_analytic_mixin of PR https://github.com/OCA/OpenUpgrade/pull/4070 + +purchase_requisition / purchase.requisition.line / analytic_tag_ids (many2many) : DEL relation: account.analytic.tag +# NOTHING TO DO + +---XML records in module 'purchase_requisition'--- +DEL ir.actions.act_window: purchase_requisition.tender_type_action +NEW ir.model.access: purchase_requisition.access_purchase_requisition_alternative_warning +NEW ir.model.access: purchase_requisition.access_purchase_requisition_create_alternative +NEW ir.model.access: purchase_requisition.access_purchase_requisition_purchase_order_group +# NOTHING TO DO + +DEL ir.sequence: purchase_requisition.seq_purchase_tender (noupdate) +# DONE: post-migration: remove safety noupdate xml record + +DEL ir.ui.menu: purchase_requisition.menu_purchase_requisition_type +NEW ir.ui.view: purchase_requisition.purchase_order_kpis_tree_inherit_purchase_requisition +NEW ir.ui.view: purchase_requisition.purchase_order_line_compare_tree +NEW ir.ui.view: purchase_requisition.purchase_order_tree_inherit_purchase_requisition +NEW ir.ui.view: purchase_requisition.purchase_requisition_alternative_warning_form +NEW ir.ui.view: purchase_requisition.purchase_requisition_create_alternative_form +DEL ir.ui.view: purchase_requisition.product_template_form_view_inherit +DEL ir.ui.view: purchase_requisition.res_config_settings_view_form +# NOTHING TO DO + +DEL purchase.requisition.type: purchase_requisition.type_multi (noupdate) +# DONE: post-migration: remove safety noupdate xml record