Skip to content

Commit

Permalink
Merge pull request #4393 from Tecnativa/16-0-ou_add-website_event_que…
Browse files Browse the repository at this point in the history
…stions

[16.0][OU-ADD] website_event_questions: Migration scripts
  • Loading branch information
pedrobaeza authored Apr 12, 2024
2 parents c0bb97a + 295d6f7 commit 30508cd
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 30508cd

Please sign in to comment.