Add bulk timeslot assignment wizard for PTI managers#6
Draft
Conversation
…s at once Agent-Logs-Url: https://github.com/agrogers/pti_ar/sessions/cb3034f3-4c84-4b9b-82fe-6b1b800529ae Co-authored-by: agrogers <13920678+agrogers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add bulk timeslot add form for teachers
Add bulk timeslot assignment wizard for PTI managers
Mar 26, 2026
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.
Managers need a way to assign all time slots to multiple teachers at once rather than one-by-one. This adds a wizard dialog accessible under PTI > Configuration > Bulk Add Time Slots.
Changes
wizard/bulk_timeslot_wizard.py—pti.bulk.timeslot.wizardTransientModel:teacher_ids(Many2manyres.partner) — teacher selectiontime_slot_ids(Many2manypti.cycle.time.slot) — all slots pre-selected by default viasearch([])action_add_timeslots()— fetches all existing combinations in one query, batch-creates only missing records, returns adisplay_notificationtoast with count then closes the dialogviews/bulk_timeslot_wizard_views.xml— dialog form withmany2many_tagsteacher picker, editable slot list, and Add/Cancel footer buttons;target="new"window actionsecurity/ir.model.access.csv— PTI Manager full CRUD on wizard modelviews/menu.xml— "Bulk Add Time Slots" menu item under Configuration (Manager only, sequence 30)Logic: skip existing, batch-create missing
Single lookup query + single batch insert regardless of how many teachers/slots are selected.
Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.