Skip to content

Commit

Permalink
Merge PR #3972 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by MiquelRForgeFlow
  • Loading branch information
OCA-git-bot committed Jan 24, 2025
2 parents f46753a + 665a3c8 commit 62b64e0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docsource/modules150-160.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 62b64e0

Please sign in to comment.