EMS

Technical Reference: ems.non_teaching_type

Overview

ems.non_teaching_type catalogues the kinds of working-schedule period that aren’t a subject — guard duty, breaks, coordination meetings, etc. Consumed by the working-schedule grid (resource.calendar.attendance.non_teaching) to decide how a period counts toward the hours-summary columns.

Module file: models/employees/non_teaching_type.py


Data Model

Fields

Field Type Required Stored Description
code Char Yes Yes Unique code
name Char (translate=True) Yes Yes Display name
is_break Boolean No Yes Dropped from both hours-summary columns on the working schedule (e.g. lunch/patio break)
is_fixed Boolean No Yes Counted in the “Other fixed-schedule hours” column every day (e.g. guard duties)
is_guard Boolean No Yes Counted as guard duty on the guard duty schedule board
is_regular_guard Boolean No Yes A regular guard duty (issue #606): only its teachers can be sent to cover a class, or a guard duty that is not regular, on the guard duty schedule board. A guard duty that is not regular (is_guard without it, e.g. WC or break) is a post that must be manned, so its absent teacher’s duty is a row to cover. Seeded True only on G
adds_up_periods Boolean No Yes Its periods of the week are added up and rounded up once, in both hours summaries (_iter_summary_entries()), instead of each counting at least one hour. Seeded True only on GB (break guard duty: 25 and 15/20-minute periods)
declaration_code Selection (default='other') No Yes Row of the official schedule declaration’s summary table these hours go to; tutoring goes to the tutored level’s row; empty: not declared. Seeded once by _ems_seed_declaration_codes(); level_or_tutoring (issue #846, not a row of the form): each block chooses between its level’s class row and its tutoring row (attention_type)
active Boolean (default=True) No Yes Standard archive flag

_order = "name"; unique_code SQL constraint. Dropped the sequence field (2026-09-07, developer feedback) — nothing consumed its value beyond the list’s own manual drag-order, so alphabetical by name is enough.


Access Control

Defined in security/ir.model.access.csv (lines 95–97).

Role Create Read Write Delete Group XML ID
Department Chief ✓ ✓ ✓ ✓ ems.group_department_chief
Teacher — ✓ — — ems.group_teacher
Secretary — ✓ — — ems.group_secretary
Administrator ✓ ✓ ✓ ✓ base.group_system

Note the admin group here is group_department_chief, not group_academic_admin like most other configuration models in this cluster — intentional, since non-teaching types are a scheduling concept department chiefs manage directly. The administrator (base.group_system) has full access too, being above Direction (issue #723: a system administrator outside the EMS groups could not even open them).


Integration Map

Model Field Relation Description
resource.calendar.attendance non_teaching Many2one Every non-subject schedule period references a type here

See Working schedules for how is_break/is_fixed feed the hours-summary computation.


Views

View File Notes
List views/community/non_teaching_type/list.xml —
Form views/community/non_teaching_type/form.xml —
Action + Menu views/community/non_teaching_type/menu.xml —