diff --git a/docsource/modules160-170.rst b/docsource/modules160-170.rst index 7b773c600105..1447db96e864 100644 --- a/docsource/modules160-170.rst +++ b/docsource/modules160-170.rst @@ -980,7 +980,7 @@ Module coverage 16.0 -> 17.0 +---------------------------------------------------+----------------------+-------------------------------------------------+ | |new| stock_delivery | Nothing to do | Split from delivery. | +---------------------------------------------------+----------------------+-------------------------------------------------+ -| stock_dropshipping | | | +| stock_dropshipping | Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ | stock_landed_costs | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/stock_dropshipping/17.0.1.0/post-migration.py b/openupgrade_scripts/scripts/stock_dropshipping/17.0.1.0/post-migration.py new file mode 100644 index 000000000000..72a102de7cdf --- /dev/null +++ b/openupgrade_scripts/scripts/stock_dropshipping/17.0.1.0/post-migration.py @@ -0,0 +1,15 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2025 Tecnativa - Pedro M. Baeza + +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + # Assign the new code to the existing picking types with these characteristics + env["stock.picking.type"].search( + [ + ("default_location_src_id.usage", "=", "supplier"), + ("default_location_dest_id.usage", "=", "customer"), + ] + ).code = "dropship" diff --git a/openupgrade_scripts/scripts/stock_dropshipping/17.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/stock_dropshipping/17.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..d718555ab8d5 --- /dev/null +++ b/openupgrade_scripts/scripts/stock_dropshipping/17.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,10 @@ +---Models in module 'stock_dropshipping'--- +---Fields in module 'stock_dropshipping'--- +stock_dropshipping / stock.picking.type / code (False) : NEW selection_keys: ['dropship', 'incoming', 'internal', 'mrp_operation', 'outgoing', 'repair_operation'], mode: modify +# DONE: post-migration: Assign the new code to the existing picking types that have default location source the suppliers one, and the target location the customer one. + +---XML records in module 'stock_dropshipping'--- +NEW ir.actions.act_window: stock_dropshipping.action_picking_tree_dropship +NEW ir.ui.menu: stock_dropshipping.dropship_picking +NEW ir.ui.view: stock_dropshipping.view_picking_internal_search_inherit_stock_dropshipping +# NOTHING TO DO: new ir records