Skip to content

Commit

Permalink
[OU-ADD] website_event_questions: Migration scripts
Browse files Browse the repository at this point in the history
TT45238
  • Loading branch information
pedrobaeza committed Apr 12, 2024
1 parent c0bb97a commit 295d6f7
Show file tree
Hide file tree
Showing 3 changed files with 31 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 @@ -838,7 +838,7 @@ Module coverage 15.0 -> 16.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| website_event_meet_quiz | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| website_event_questions | | |
| website_event_questions | Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| website_event_sale | Nothing to do | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2024 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.add_fields(
env,
[
(
"is_mandatory_answer",
"event.question",
"event_question",
"boolean",
False,
"website_event_questions",
True,
)
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---Models in module 'website_event_questions'---
---Fields in module 'website_event_questions'---
website_event_questions / event.question / is_mandatory_answer (boolean) : NEW
# DONE: pre-migration: Pre-create column with default=True, which preserves v15 behavior

---XML records in module 'website_event_questions'---
NEW ir.ui.view: website_event_questions.event_registration_view_tree
# NOTHING TO DO: ir stuff with noupdate=0

0 comments on commit 295d6f7

Please sign in to comment.