diff --git a/docsource/modules150-160.rst b/docsource/modules150-160.rst index eb6fe500c863..c8ec7bd8c2af 100644 --- a/docsource/modules150-160.rst +++ b/docsource/modules150-160.rst @@ -134,7 +134,7 @@ Module coverage 15.0 -> 16.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | event_booth | Nothing to do | | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| event_booth_sale | | | +| event_booth_sale | Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | event_crm | Nothing to do | | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/event_booth_sale/16.0.1.1/post-migration.py b/openupgrade_scripts/scripts/event_booth_sale/16.0.1.1/post-migration.py new file mode 100644 index 000000000000..adcac39b1403 --- /dev/null +++ b/openupgrade_scripts/scripts/event_booth_sale/16.0.1.1/post-migration.py @@ -0,0 +1,28 @@ +# Copyright 2025 ForgeFlow S.L. (http://www.forgeflow.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade + + +def fill_related_stored_fields(env): + openupgrade.logged_query( + env.cr, + """UPDATE event_booth eb + SET price = ebc.price + FROM event_booth_category ebc + WHERE eb.booth_category_id = ebc.id + """, + ) + openupgrade.logged_query( + env.cr, + """UPDATE event_type_booth etb + SET price = ebc.price + FROM event_booth_category ebc + WHERE etb.booth_category_id = ebc.id + """, + ) + + +@openupgrade.migrate() +def migrate(env, version): + fill_related_stored_fields(env) diff --git a/openupgrade_scripts/scripts/event_booth_sale/16.0.1.1/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/event_booth_sale/16.0.1.1/upgrade_analysis_work.txt new file mode 100644 index 000000000000..9a0254d3d19d --- /dev/null +++ b/openupgrade_scripts/scripts/event_booth_sale/16.0.1.1/upgrade_analysis_work.txt @@ -0,0 +1,15 @@ +---Models in module 'event_booth_sale'--- +---Fields in module 'event_booth_sale'--- +event_booth_sale / event.booth / price (float) : is now stored +event_booth_sale / event.type.booth / price (float) : is now stored +# DONE: post-migration: fill related stored fields + +event_booth_sale / product.template / detailed_type (False) : selection_keys is now '['consu', 'course', 'event', 'event_booth', 'product', 'service']' ('['consu', 'event', 'event_booth', 'gift', 'product', 'service']') +# NOTHING TO DO + +---XML records in module 'event_booth_sale'--- +NEW ir.ui.view: event_booth_sale.event_booth_view_graph +NEW ir.ui.view: event_booth_sale.event_booth_view_pivot +NEW ir.ui.view: event_booth_sale.event_booth_view_tree_from_event +DEL ir.ui.view: event_booth_sale.event_booth_view_tree +# NOTHING TO DO