[19.0][MIG] event: slots + question m2m promotion#5637
Open
dnplkndll wants to merge 1 commit into
Open
Conversation
edcca6a to
7ab2ce2
Compare
Stage migration for the v19 event module overhaul: * event.question.event_id (m2o) and event.question.event_type_id (m2o) are promoted to many2many fields (event_ids / event_type_ids). Pre-migration renames the legacy FK columns via get_legacy_name so they survive ORM init; post-migration copies them into the new join tables event_event_event_question_rel and event_question_event_type_rel. This same data also powers the reverse o2m->m2m promotions on event.event.question_ids / general_question_ids / specific_question_ids and event.type.question_ids — no extra work needed. * New models event.slot and event.mail.slot are pure additions (Odoo creates the tables; data is event-instance specific). * Selection-key removals on event.event.badge_format and DEL required fields on event.stage are left to database_cleanup per maintainer policy. Same for the DEL event.event_stage_cancelled data record.
7ab2ce2 to
753bcc9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
19.0 reshapes
event.question:event_id(many2one) →event_ids(many2many)event_type_id(many2one) →event_type_ids(many2many)The reverse sides on
event.event(question_ids,general_question_ids,specific_question_ids) and onevent.type(question_ids) also flip from one2many to many2many, all sharing the new join tablesevent_event_event_question_relandevent_question_event_type_rel.Approach:
event_questionvia `get_legacy_name()` so they survive ORM init.Two new pure-addition models (
event.slot,event.mail.slot) are created by ORM at init time. Selection-key shrink onevent.event.badge_formatand DEL required fields onevent.stageare left todatabase_cleanupper maintainer policy. Same for the DELevent.event_stage_cancelleddata record.The 5 simple
event_*submodules ship in a sibling PR.Test plan
pre-commit run --files <changed>cleanTest OpenUpgrade migrationgreen onledoent/19.0-mig-test-event-slots-questions