diff --git a/openupgrade_scripts/scripts/repair/16.0.1.0/post-migration.py b/openupgrade_scripts/scripts/repair/16.0.1.0/post-migration.py new file mode 100644 index 000000000000..4c370c0fd892 --- /dev/null +++ b/openupgrade_scripts/scripts/repair/16.0.1.0/post-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 + +def _compute_repair_price_total(env, model): + fees = env[model].search([]) + fees._compute_price_total_and_subtotal() + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env.cr, "resource", "16.0.1.0/noupdate_changes.xml") + _compute_repair_price_total(env, "repair.fee") + _compute_repair_price_total(env, "repair.line") diff --git a/openupgrade_scripts/scripts/repair/16.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/repair/16.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..942a17d54a3c --- /dev/null +++ b/openupgrade_scripts/scripts/repair/16.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,26 @@ +---Models in module 'repair'--- +---Fields in module 'repair'--- +repair / repair.fee / price_total (float) : is now stored +repair / repair.line / price_total (float) : is now stored +# DONE: recomputed in post_migration + +repair / repair.line / lot_id (many2one) : relation is now 'stock.lot' ('stock.production.lot') [nothing to do] +repair / repair.order / lot_id (many2one) : relation is now 'stock.lot' ('stock.production.lot') [nothing to do] +# NOTHING TO DO: renaming done in stock + +repair / repair.order / location_id (many2one) : now a function +repair / repair.order / product_uom (many2one) : now a function +# NOTHING TO DO: field already existed (was a onchange) + +repair / repair.order / picking_id (many2one) : NEW relation: stock.picking +repair / stock.picking / repair_ids (one2many) : NEW relation: repair.order +# NOTHING TO DO: new relation + +repair / stock.picking.type / is_repairable (boolean) : NEW hasdefault: compute +repair / stock.picking.type / return_type_of_ids (one2many) : NEW relation: stock.picking.type +# NOTHING TO DO: new fields + +---XML records in module 'repair'--- +NEW ir.ui.view: repair.repair_view_picking_form +NEW ir.ui.view: repair.repair_view_picking_type_form +# NOTHING TO DO