metatroncubeswdev 7ac5880f20 feat(community_school): core models + teacher attendance portal (Sessions 3-A, 3-B)
Session 3-A - core models: community.school.term, .level (admin-defined,
so the same module fits a Grade 1-12 school or a Beginner-Advanced
language school with no code change), .class (auto-creates a linked
slide.channel for LMS glue), .student, .enrollment, and .attendance, plus
is_teacher on res.partner. Class enrolled_count and enrollment
attendance_rate are stored/non-stored computes driven by the
enrollment/attendance one2many chains.

Session 3-B - teacher attendance + at-risk reporting: a portal page at
/school/attendance (auth='user', scoped to classes where teacher_id
matches the logged-in user's partner - works whether the teacher is an
internal or portal user) with a roster and batch save, built as a v19
Interaction (same pattern as event_qr_ticketing's check-in page). Marking
a student absent queues a configurable notice to the parent partner.
Enrollment.is_at_risk flags students below a configurable attendance
threshold (School settings page, same <app>/<block>/<setting> pattern as
community_membership), plus an admin pivot attendance report and an
At-Risk Students list.

Verified against a live Odoo 19 + Postgres 16 container: 14/14 automated
tests pass (class/slide-channel creation, enrolled_count tracking incl.
withdrawal, attendance_rate and at-risk computation, unique
enrollment+date constraint, absence email queuing), plus a full manual
live run - created a term/level/class/student/enrollment via JSON-RPC,
loaded the actual /school/attendance page as the teacher, POSTed a batch
save marking the student absent, and confirmed both the attendance record
and the queued "Absence notice" mail.mail record.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 21:37:56 -04:00

2.3 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_community_school_term_coordinatorcommunity.school.term coordinatormodel_community_school_termgroup_school_coordinator1111
3access_community_school_term_teachercommunity.school.term teacher readmodel_community_school_termgroup_school_teacher1000
4access_community_school_level_coordinatorcommunity.school.level coordinatormodel_community_school_levelgroup_school_coordinator1111
5access_community_school_level_teachercommunity.school.level teacher readmodel_community_school_levelgroup_school_teacher1000
6access_community_school_class_coordinatorcommunity.school.class coordinatormodel_community_school_classgroup_school_coordinator1111
7access_community_school_class_teachercommunity.school.class teacher readmodel_community_school_classgroup_school_teacher1000
8access_community_school_student_coordinatorcommunity.school.student coordinatormodel_community_school_studentgroup_school_coordinator1111
9access_community_school_student_teachercommunity.school.student teacher readmodel_community_school_studentgroup_school_teacher1000
10access_community_school_enrollment_coordinatorcommunity.school.enrollment coordinatormodel_community_school_enrollmentgroup_school_coordinator1111
11access_community_school_enrollment_teachercommunity.school.enrollment teacher readmodel_community_school_enrollmentgroup_school_teacher1000
12access_community_school_attendance_coordinatorcommunity.school.attendance coordinatormodel_community_school_attendancegroup_school_coordinator1111
13access_community_school_attendance_teachercommunity.school.attendance teachermodel_community_school_attendancegroup_school_teacher1110
14access_community_school_student_portalcommunity.school.student portal readmodel_community_school_studentbase.group_portal1000
15access_community_school_enrollment_portalcommunity.school.enrollment portal readmodel_community_school_enrollmentbase.group_portal1000
16access_community_school_attendance_portalcommunity.school.attendance portal readmodel_community_school_attendancebase.group_portal1000
17access_community_school_class_portalcommunity.school.class portal readmodel_community_school_classbase.group_portal1000