Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docsource/modules170-180.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Module coverage 17.0 -> 18.0
+---------------------------------------------------+----------------------+-------------------------------------------------+
| |new| event_product |Done | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| event_sale |Nothing to do | |
| event_sale |Done | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| event_sms |Done |No DB layout changes. |
+---------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ event_product / event.type.ticket / price (float) : previ
event_product / event.type.ticket / price_reduce (float) : previously in module event_sale
event_product / event.type.ticket / product_id (many2one) : previously in module event_sale
event_product / product.product / event_ticket_ids (one2many) : previously in module event_sale
event_product / product.template / service_tracking (False) : NEW selection_keys: ['event', 'no'], mode: modify
# NOTHING TO DO: Moved to this module, and handled by ORM (doing the field/model XML-IDs renaming)

event_product / product.template / service_tracking (False) : NEW selection_keys: ['event', 'no'], mode: modify
# NOTHING TO DO: Handled in event_sale migration

---XML records in module 'event_product'---
NEW ir.ui.view: event_product.event_event_ticket_form_view
NEW ir.ui.view: event_product.event_event_ticket_view_form_from_event
Expand Down
17 changes: 17 additions & 0 deletions openupgrade_scripts/scripts/event_sale/18.0.1.3/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2026 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
# Preserve event products by migrating their type to service tracking.
openupgrade.logged_query(
env.cr,
"""
UPDATE product_template
SET service_tracking = 'event'
WHERE detailed_type = 'event'
""",
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ event_sale / event.type.ticket / price (float) : module
event_sale / event.type.ticket / price_reduce (float) : module is now 'event_product' ('event_sale')
event_sale / event.type.ticket / product_id (many2one) : module is now 'event_product' ('event_sale')
event_sale / product.product / event_ticket_ids (one2many) : module is now 'event_product' ('event_sale')
event_sale / product.template / detailed_type (False) : DEL selection_keys: ['combo', 'consu', 'event', 'product', 'service'], mode: modify
# NOTHING TO DO: Module changed handled by ORM

event_sale / product.template / detailed_type (False) : DEL selection_keys: ['combo', 'consu', 'event', 'product', 'service'], mode: modify
# DONE: pre-migration: Assign this new value to products with detailed_type='event'

---XML records in module 'event_sale'---
NEW ir.ui.view: event_sale.product_template_form_view
DEL ir.ui.view: event_sale.event_event_ticket_form_view
Expand Down
Loading