diff --git a/docsource/modules160-170.rst b/docsource/modules160-170.rst index 744a69c1eaaa..d92097f1d4f5 100644 --- a/docsource/modules160-170.rst +++ b/docsource/modules160-170.rst @@ -138,7 +138,7 @@ Module coverage 16.0 -> 17.0 +---------------------------------------------------+----------------------+-------------------------------------------------+ | event_sms | |No DB layout changes. | +---------------------------------------------------+----------------------+-------------------------------------------------+ -| fleet | | | +| fleet | Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ | gamification | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/fleet/17.0.0.1/pre-migration.py b/openupgrade_scripts/scripts/fleet/17.0.0.1/pre-migration.py new file mode 100644 index 000000000000..ecda8f6d34cb --- /dev/null +++ b/openupgrade_scripts/scripts/fleet/17.0.0.1/pre-migration.py @@ -0,0 +1,20 @@ +# Copyright 2024 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.logged_query( + env.cr, + """ + ALTER TABLE fleet_vehicle_model_brand + ADD COLUMN IF NOT EXISTS active BOOLEAN + """, + ) + openupgrade.logged_query( + env.cr, + """UPDATE fleet_vehicle_model_brand + SET active = True + """, + ) diff --git a/openupgrade_scripts/scripts/fleet/17.0.0.1/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/fleet/17.0.0.1/upgrade_analysis_work.txt new file mode 100644 index 000000000000..d04857da27c9 --- /dev/null +++ b/openupgrade_scripts/scripts/fleet/17.0.0.1/upgrade_analysis_work.txt @@ -0,0 +1,33 @@ +---Models in module 'fleet'--- +---Fields in module 'fleet'--- +fleet / fleet.vehicle / activity_user_id (many2one) : not related anymore +fleet / fleet.vehicle / activity_user_id (many2one) : now a function +fleet / fleet.vehicle / image_1024 (binary) : NEW attachment: True, isrelated: related, stored +fleet / fleet.vehicle / image_128 (binary) : is now stored +fleet / fleet.vehicle / image_1920 (binary) : NEW attachment: True +fleet / fleet.vehicle / image_256 (binary) : NEW attachment: True, isrelated: related, stored +fleet / fleet.vehicle / image_512 (binary) : NEW attachment: True, isrelated: related, stored +fleet / fleet.vehicle / message_main_attachment_id (many2one): DEL relation: ir.attachment +fleet / fleet.vehicle / order_date (date) : NEW +fleet / fleet.vehicle / vehicle_properties (properties): NEW hasdefault: compute +# NOTHING TO DO +fleet / fleet.vehicle.log.contract / activity_user_id (many2one) : not related anymore +fleet / fleet.vehicle.log.contract / activity_user_id (many2one) : now a function +fleet / fleet.vehicle.log.contract / message_main_attachment_id (many2one): DEL relation: ir.attachment +fleet / fleet.vehicle.log.services / activity_user_id (many2one) : not related anymore +fleet / fleet.vehicle.log.services / activity_user_id (many2one) : now a function +fleet / fleet.vehicle.log.services / message_main_attachment_id (many2one): DEL relation: ir.attachment +# NOTHING TO DO +fleet / fleet.vehicle.model / image_1024 (binary) : NEW attachment: True, isrelated: related, stored +fleet / fleet.vehicle.model / image_128 (binary) : is now stored +fleet / fleet.vehicle.model / image_1920 (binary) : NEW attachment: True +fleet / fleet.vehicle.model / image_256 (binary) : NEW attachment: True, isrelated: related, stored +fleet / fleet.vehicle.model / image_512 (binary) : NEW attachment: True, isrelated: related, stored +fleet / fleet.vehicle.model / vehicle_properties_definition (properties_definition): NEW +# NOTHING TO DO +fleet / fleet.vehicle.model.brand / active (boolean) : NEW hasdefault: default +# DONE: Create the column and set the default value in pre-migration +---XML records in module 'fleet'--- +NEW fleet.service.type: fleet.type_contract_leasing (noupdate) +NEW fleet.service.type: fleet.type_contract_omnium (noupdate) +NEW ir.ui.view: fleet.fleet_vechicle_costs_report_view_form