diff --git a/docsource/modules130-140.rst b/docsource/modules130-140.rst index 4aec1e44e4b3..3709bc6e662d 100644 --- a/docsource/modules130-140.rst +++ b/docsource/modules130-140.rst @@ -584,7 +584,7 @@ Module coverage 13.0 -> 14.0 +--------------------------------------------+-------------------------------------------------+ |rating | Done | +--------------------------------------------+-------------------------------------------------+ -|repair | | +|repair | Done | +--------------------------------------------+-------------------------------------------------+ |resource | Nothing to do | +--------------------------------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/repair/14.0.1.0/noupdate_changes.xml b/openupgrade_scripts/scripts/repair/14.0.1.0/noupdate_changes.xml index 0d809edb54e8..c3e39d6992c5 100644 --- a/openupgrade_scripts/scripts/repair/14.0.1.0/noupdate_changes.xml +++ b/openupgrade_scripts/scripts/repair/14.0.1.0/noupdate_changes.xml @@ -28,4 +28,9 @@ + + + [('company_id', 'in', company_ids)] + repair order multi-company + diff --git a/openupgrade_scripts/scripts/repair/14.0.1.0/post-migration.py b/openupgrade_scripts/scripts/repair/14.0.1.0/post-migration.py new file mode 100644 index 000000000000..e3a393f7d425 --- /dev/null +++ b/openupgrade_scripts/scripts/repair/14.0.1.0/post-migration.py @@ -0,0 +1,13 @@ +# Copyright (C) 2021 Open Source Integrators +# Copyright 2021 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + # Load noupdate changes + openupgrade.load_data(env.cr, "repair", "14.0.1.0/noupdate_changes.xml") + openupgrade.delete_record_translations( + env.cr, "repair", ["mail_template_repair_quotation"] + ) diff --git a/openupgrade_scripts/scripts/repair/14.0.1.0/pre-migration.py b/openupgrade_scripts/scripts/repair/14.0.1.0/pre-migration.py new file mode 100644 index 000000000000..281dab23cfee --- /dev/null +++ b/openupgrade_scripts/scripts/repair/14.0.1.0/pre-migration.py @@ -0,0 +1,12 @@ +# Copyright 2021 ForgeFlow S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + +_xmlid_renames = [ + ("repair.repair_rule", "repair.repair_order_rule"), +] + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.rename_xmlids(env.cr, _xmlid_renames) diff --git a/openupgrade_scripts/scripts/repair/14.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/repair/14.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..f7a5b0de0b1a --- /dev/null +++ b/openupgrade_scripts/scripts/repair/14.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,27 @@ +---Models in module 'repair'--- +obsolete model repair.cancel [transient] +# NOTHING TO DO + +---Fields in module 'repair'--- +repair / repair.line / repair_id (many2one) : now required +repair / repair.order / company_id (many2one) : now required, req_default: function +# NOTHING TO DO: Already filled for all records that came regularly by Odoo UI + +repair / repair.fee / company_id (many2one) : NEW relation: res.company, isrelated: related, stored +repair / repair.line / company_id (many2one) : NEW relation: res.company, isrelated: related, stored +# NOTHING TO DO: Filled by ORM + +---XML records in module 'repair'--- +DEL ir.actions.act_window: repair.action_cancel_repair +NEW ir.model.access: repair.access_repair_order_make_invoice +NEW ir.model.access: repair.access_stock_warn_insufficient_qty_repair +DEL ir.ui.view: repair.view_cancel_repair +# NOTHING TO DO: noupdate=0 ir records + +NEW ir.rule: repair.repair_order_rule (noupdate) +DEL ir.rule: repair.repair_rule (noupdate) +# DONE: pre-migration: renamed xmlid + +NEW ir.rule: repair.repair_fee_rule (noupdate) +NEW ir.rule: repair.repair_line_rule (noupdate) +# NOTHING TO DO: New records \ No newline at end of file