diff --git a/docsource/modules150-160.rst b/docsource/modules150-160.rst index 0be9eb98faa4..092a50c6da2c 100644 --- a/docsource/modules150-160.rst +++ b/docsource/modules150-160.rst @@ -658,7 +658,7 @@ Module coverage 15.0 -> 16.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | project_timesheet_holidays | |No DB layout changes. | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| purchase | | | +| purchase | Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | purchase_mrp | | | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/purchase/16.0.1.2/post-migration.py b/openupgrade_scripts/scripts/purchase/16.0.1.2/post-migration.py new file mode 100644 index 000000000000..cf2e9a88821a --- /dev/null +++ b/openupgrade_scripts/scripts/purchase/16.0.1.2/post-migration.py @@ -0,0 +1,12 @@ +# Copyright 2024 Le Filament +# 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.cr, "purchase", "16.0.1.2/noupdate_changes.xml") + openupgrade.delete_records_safely_by_xml_id( + env, + ["purchase.mail_notification_confirm"], + ) diff --git a/openupgrade_scripts/scripts/purchase/16.0.1.2/pre-migration.py b/openupgrade_scripts/scripts/purchase/16.0.1.2/pre-migration.py new file mode 100644 index 000000000000..eacaaa7a33fd --- /dev/null +++ b/openupgrade_scripts/scripts/purchase/16.0.1.2/pre-migration.py @@ -0,0 +1,14 @@ +# Copyright 2024 Le Filament +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade, openupgrade_160 + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade_160.fill_analytic_distribution( + env, + table="purchase_order_line", + m2m_rel="account_analytic_tag_purchase_order_line_rel", + m2m_column1="purchase_order_line_id", + analytic_account_column="account_analytic_id", + ) diff --git a/openupgrade_scripts/scripts/purchase/16.0.1.2/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/purchase/16.0.1.2/upgrade_analysis_work.txt new file mode 100644 index 000000000000..3f21988ecbc6 --- /dev/null +++ b/openupgrade_scripts/scripts/purchase/16.0.1.2/upgrade_analysis_work.txt @@ -0,0 +1,34 @@ +---Models in module 'purchase'--- +---Fields in module 'purchase'--- +purchase / account.analytic.applicability / business_domain (False) : NEW selection_keys: ['bill', 'expense', 'general', 'invoice', 'purchase_order'], mode: modify +# NOTHING TO DO: extra selection will be added by ORM + +purchase / product.category / property_account_creditor_price_difference_categ (many2one): module is now 'purchase_price_diff' ('purchase') +purchase / product.product / property_account_creditor_price_difference (many2one): module is now 'purchase_price_diff' ('purchase') +purchase / product.template / property_account_creditor_price_difference (many2one): module is now 'purchase_price_diff' ('purchase') +# NOTHING TO DO: will be handled by ORM + +purchase / purchase.order.line / account_analytic_id (many2one): DEL relation: account.analytic.account +purchase / purchase.order.line / analytic_distribution (json) : NEW hasdefault: compute +purchase / purchase.order.line / analytic_distribution_search (json): NEW +purchase / purchase.order.line / analytic_precision (integer) : NEW hasdefault: default +purchase / purchase.order.line / analytic_tag_ids (many2many) : DEL relation: account.analytic.tag +# DONE: fast fill analytic_distribution in pre-migration + +---XML records in module 'purchase'--- +DEL ir.ui.view: purchase.mail_notification_confirm (noupdate) +# DONE: post-migration: remove noupdate view + +DEL ir.actions.act_window: purchase.purchase_action_dashboard_kanban +DEL ir.actions.act_window: purchase.purchase_action_dashboard_list +DEL ir.model.access: purchase.access_account_type +DEL ir.ui.view: purchase.product_template_form_view +DEL ir.ui.view: purchase.view_category_property_form +# NOTHING TO DO : will be deleted by ORM + +NEW ir.actions.act_window: purchase.action_purchase_history +NEW ir.model.access: purchase.access_product_tag_purchase_manager +NEW ir.ui.view: purchase.purchase_history_tree +NEW ir.ui.view: purchase.purchase_order_view_kanban_without_dashboard +NEW mail.message.subtype: purchase.mt_rfq_sent (noupdate) +# NOTHING TO DO : will be created by ORM