metatroncubeswdev 8b7bd91f74 O1: mc_education_base gate, first slice - academic calendar
mc.academic.year and mc.academic.term: the two models every other O1
model (program, batch, enrollment...) will hang off. Exactly one
current year is enforced two ways - the ORM toggles is_current off
the previous year on create/write, and a partial unique index on
(company_id) WHERE is_current backs it at the database level so the
rule holds even if something writes around the ORM.

Security groups for all six roles from the spec (Administrator,
Staff, Teacher, Accountant, Guardian, Student) are scaffolded now
since every later O1 model needs them, though only Administrator/
Staff have access rows on these two models so far.

Verified against a real odoo:19.0 container, not just read: module
installs clean with views, menus and demo data, and all 7 test
methods pass. That surfaced two things CLAUDE.md's Coding Standards
section didn't anticipate, since Odoo 19 moved past 17/18-era APIs
in ways not caught by an 18-era mental model:

  - `_sql_constraints` is gone; constraints are now per-attribute
    `models.Constraint(sql, message)`.
  - `res.groups.category_id` is gone; groups now hang off a new
    `res.groups.privilege` record, which carries the category.

Both addons/mc_education_base files already use the new APIs.
CLAUDE.md itself needs a note added in a follow-up so this isn't
rediscovered per-module - flagging here per its own closing
instruction ("say so and propose the correction... update this file
in the same PR") rather than leaving it implicit in this commit body.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 08:53:34 -04:00

23 lines
744 B
Python

{
"name": "School ERP - Base",
"version": "19.0.1.0.0",
"category": "Education",
"summary": "Core academic structure: years, terms, programs, batches, students, guardians, teachers, enrollment.",
"author": "Metatroncube Software Solutions LLP",
"license": "Other proprietary",
"depends": ["base", "mail", "contacts", "hr"],
"data": [
"security/mc_education_security.xml",
"security/ir.model.access.csv",
"views/mc_academic_year_views.xml",
"views/mc_academic_term_views.xml",
"views/mc_education_menus.xml",
],
"demo": [
"demo/mc_academic_year_demo.xml",
"demo/mc_academic_term_demo.xml",
],
"installable": True,
"application": True,
}