Está é a base do projeto que vamos nos basear
This commit is contained in:
parent
3ae0293647
commit
702431ce00
|
|
@ -1,17 +1,32 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
{
|
{
|
||||||
'name': 'Gestao Escolar',
|
'name': 'Gestão Escolar Avançada - CEFOPE Core',
|
||||||
'version': '1.0',
|
'version': '1.0.0',
|
||||||
'summary': 'Sistema de Gestão Escolar',
|
'summary': 'Sistema de Gestão Escolar para as Instituíções de Angola',
|
||||||
'author': 'Sebastiao',
|
'description': """
|
||||||
|
Módulo central do projeto CEFOPE:
|
||||||
|
- Gestão de Candidatos e Exames
|
||||||
|
- Configuração de Cursos e Turmas
|
||||||
|
- Controlo de Matrículas e Notas
|
||||||
|
""",
|
||||||
|
'author': 'Hilaritech',
|
||||||
'category': 'Education',
|
'category': 'Education',
|
||||||
'depends': ['base'],
|
'license': 'LGPL-3',
|
||||||
|
|
||||||
|
'depends': [
|
||||||
|
'base',
|
||||||
|
],
|
||||||
|
|
||||||
'data': [
|
'data': [
|
||||||
'security/groups.xml',
|
'security/cefope_security_groups.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'views/school_views.xml',
|
'views/academic_applicant_views.xml',
|
||||||
|
'views/academic_course_views.xml',
|
||||||
|
'views/academic_exam_views.xml',
|
||||||
|
'views/menus.xml',
|
||||||
],
|
],
|
||||||
|
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'application': True,
|
'application': True,
|
||||||
|
'auto_install': False,
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
|
@ -1,7 +1,3 @@
|
||||||
from . import student
|
from . import academic_applicant
|
||||||
from . import teacher
|
from . import academic_exam
|
||||||
from . import academic_year
|
from . import academic_course
|
||||||
from . import school_class
|
|
||||||
from . import subject
|
|
||||||
from . import enrollment
|
|
||||||
from . import assessment
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,79 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from odoo import fields, models, api
|
||||||
|
from odoo.exceptions import ValidationError
|
||||||
|
|
||||||
|
|
||||||
|
class AcademicApplicant(models.Model):
|
||||||
|
_name = 'academic.applicant'
|
||||||
|
_description = 'Candidato Académico'
|
||||||
|
_order = 'id desc'
|
||||||
|
|
||||||
|
# --- Dados Pessoais ---
|
||||||
|
name = fields.Char(string="Nome Completo", required=True)
|
||||||
|
birth_date = fields.Date(string="Data de Nascimento", required=True)
|
||||||
|
gender = fields.Selection([
|
||||||
|
('M', 'Masculino'),
|
||||||
|
('F', 'Feminino')
|
||||||
|
], string="Género", required=True)
|
||||||
|
bi = fields.Char(string="Número de Identidade (BI)", required=True)
|
||||||
|
|
||||||
|
# --- Documentos (Binary) ---
|
||||||
|
photo_bi = fields.Binary(string="Foto do BI (Frente e Verso)", attachment=True, required=True)
|
||||||
|
certificate = fields.Binary(string="Certificado de Conclusão", attachment=True, required=True)
|
||||||
|
|
||||||
|
# --- Histórico Escolar ---
|
||||||
|
previous_school = fields.Char(string="Escola Anterior", required=True)
|
||||||
|
previous_school_type = fields.Selection([
|
||||||
|
('public', 'Pública'),
|
||||||
|
('private', 'Privada'),
|
||||||
|
('ppp', 'Parceria Público-Privada')
|
||||||
|
], string="Tipo de Escola", default='public', required=True)
|
||||||
|
graduation_year = fields.Integer(string="Ano de Conclusão", required=True)
|
||||||
|
|
||||||
|
# --- Contactos ---
|
||||||
|
phone = fields.Char(string="Telefone")
|
||||||
|
email = fields.Char(string="Email")
|
||||||
|
|
||||||
|
# --- Relações ---
|
||||||
|
course_id = fields.Many2one('academic.course', string="Curso Pretendido", required=True)
|
||||||
|
exam_id = fields.Many2one("academic.exam", string="Exame de Acesso")
|
||||||
|
exam_score = fields.Float(string="Nota do Exame", digits=(1, 2))
|
||||||
|
|
||||||
|
# Relacionamento com o Utilizador (Para Record Rules)
|
||||||
|
user_id = fields.Many2one('res.users', string="Utilizador", default=lambda self: self.env.user)
|
||||||
|
|
||||||
|
# --- Workflow de Estado ---
|
||||||
|
state = fields.Selection([
|
||||||
|
('draft', 'Rascunho'),
|
||||||
|
('submitted', 'Submetido'),
|
||||||
|
('exam', 'Exame Marcado'),
|
||||||
|
('taken', 'Exame Realizado'),
|
||||||
|
('approved', 'Aprovado'),
|
||||||
|
('rejected', 'Rejeitado')
|
||||||
|
], string="Estado", default='draft')
|
||||||
|
|
||||||
|
|
||||||
|
# --- Funções de Fluxo (Botões do Header) ---
|
||||||
|
|
||||||
|
def action_submit(self):
|
||||||
|
"""Apenas valida documentos e avança para Submetido"""
|
||||||
|
for record in self:
|
||||||
|
if not record.photo_bi or not record.bi:
|
||||||
|
raise ValidationError("Erro: É obrigatório anexar a foto do BI e preencher o número do BI!")
|
||||||
|
record.state = 'submitted'
|
||||||
|
|
||||||
|
def action_mark_exam(self):
|
||||||
|
"""Esta é a função que exige o exame. Só deve ser clicada APÓS a submissão"""
|
||||||
|
for record in self:
|
||||||
|
if not record.exam_id:
|
||||||
|
raise ValidationError("Erro: Selecione primeiro o Exame de Acesso no campo correspondente.")
|
||||||
|
record.state = 'exam'
|
||||||
|
|
||||||
|
@api.onchange('exam_score')
|
||||||
|
def _onchange_exam_score(self):
|
||||||
|
"""Quando a nota muda (mesmo na lista de chamada), atualiza o estado"""
|
||||||
|
for record in self:
|
||||||
|
if record.exam_score >= 10:
|
||||||
|
record.state = 'approved'
|
||||||
|
elif 0 < record.exam_score < 10:
|
||||||
|
record.state = 'rejected'
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class AcademicCourse(models.Model):
|
||||||
|
_name = 'academic.course'
|
||||||
|
_description = 'Curso Académico'
|
||||||
|
_order = 'name'
|
||||||
|
|
||||||
|
name = fields.Char(string="Nome do Curso", required=True)
|
||||||
|
code = fields.Char(string="Código do Curso", help="Ex: TI-01, MEC-02")
|
||||||
|
duration = fields.Integer(string="Duração (Anos)", default=4)
|
||||||
|
description = fields.Text(string="Descrição/Perfil de Saída")
|
||||||
|
|
||||||
|
# Campo para definir se o curso está ativo para novas inscrições
|
||||||
|
active = fields.Boolean(string="Ativo", default=True)
|
||||||
|
|
||||||
|
# Relacionamento: Um curso tem muitos candidatos
|
||||||
|
applicant_ids = fields.One2many(
|
||||||
|
'academic.applicant',
|
||||||
|
'course_id',
|
||||||
|
string="Candidatos Inscritos"
|
||||||
|
)
|
||||||
|
|
||||||
|
_sql_constraints = [
|
||||||
|
('name_unique', 'unique(name)', 'O nome do curso deve ser único!'),
|
||||||
|
('code_unique', 'unique(code)', 'O código do curso deve ser único!')
|
||||||
|
]
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from odoo import fields, models, api
|
||||||
|
|
||||||
|
|
||||||
|
class AcademicExam(models.Model):
|
||||||
|
_name = 'academic.exam'
|
||||||
|
_description = 'Exame de Acesso'
|
||||||
|
_order = 'date desc'
|
||||||
|
|
||||||
|
name = fields.Char(string="Identificação do Exame", required=True, help="Ex: Exame de Informática - Sala 13")
|
||||||
|
date = fields.Datetime(string="Data e Hora", required=True)
|
||||||
|
room = fields.Char(string="Sala/Local", required=True)
|
||||||
|
capacity = fields.Integer(string="Capacidade Máxima", default=30)
|
||||||
|
|
||||||
|
# Relacionamento com o curso (opcional, se o exame for por curso)
|
||||||
|
course_id = fields.Many2one('academic.course', string="Curso Relacionado")
|
||||||
|
|
||||||
|
# Lista de candidatos inscritos neste exame específico
|
||||||
|
applicant_ids = fields.One2many(
|
||||||
|
'academic.applicant',
|
||||||
|
'exam_id',
|
||||||
|
string="Candidatos Inscritos"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Campo calculado para saber quantos já estão inscritos
|
||||||
|
applicant_count = fields.Integer(
|
||||||
|
string="Total Inscritos",
|
||||||
|
compute='_compute_applicant_count',
|
||||||
|
store=True
|
||||||
|
)
|
||||||
|
|
||||||
|
@api.depends('applicant_ids')
|
||||||
|
def _compute_applicant_count(self):
|
||||||
|
for record in self:
|
||||||
|
record.applicant_count = len(record.applicant_ids)
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
class AcademicYear(models.Model):
|
|
||||||
_name = 'school.academic.year'
|
|
||||||
_description = 'Academic Year'
|
|
||||||
|
|
||||||
name = fields.Char(required=True)
|
|
||||||
start_date = fields.Date()
|
|
||||||
end_date = fields.Date()
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
class SchoolAssessment(models.Model):
|
|
||||||
_name = 'school.assessment'
|
|
||||||
_description = 'Assessment'
|
|
||||||
|
|
||||||
enrollment_id = fields.Many2one(
|
|
||||||
'school.enrollment',
|
|
||||||
string="Enrollment"
|
|
||||||
)
|
|
||||||
|
|
||||||
subject_id = fields.Many2one(
|
|
||||||
'school.subject',
|
|
||||||
string="Subject"
|
|
||||||
)
|
|
||||||
|
|
||||||
grade = fields.Float(string="Grade")
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
class SchoolEnrollment(models.Model):
|
|
||||||
_name = 'school.enrollment'
|
|
||||||
_description = 'Enrollment'
|
|
||||||
|
|
||||||
student_id = fields.Many2one(
|
|
||||||
'cefope.student',
|
|
||||||
string="Student"
|
|
||||||
)
|
|
||||||
|
|
||||||
class_id = fields.Many2one(
|
|
||||||
'school.class',
|
|
||||||
string="Class"
|
|
||||||
)
|
|
||||||
|
|
||||||
academic_year_id = fields.Many2one(
|
|
||||||
'school.academic.year',
|
|
||||||
string="Academic Year"
|
|
||||||
)
|
|
||||||
|
|
||||||
status = fields.Selection([
|
|
||||||
('active','Active'),
|
|
||||||
('completed','Completed'),
|
|
||||||
('cancelled','Cancelled')
|
|
||||||
], default='active')
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
class SchoolClass(models.Model):
|
|
||||||
_name = 'school.class'
|
|
||||||
_description = 'Class'
|
|
||||||
|
|
||||||
name = fields.Char(required=True)
|
|
||||||
|
|
||||||
academic_year_id = fields.Many2one(
|
|
||||||
'school.academic.year',
|
|
||||||
string="Academic Year"
|
|
||||||
)
|
|
||||||
|
|
||||||
teacher_id = fields.Many2one(
|
|
||||||
'school.teacher',
|
|
||||||
string="Teacher"
|
|
||||||
)
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
class Student(models.Model):
|
|
||||||
_name = 'cefope.student'
|
|
||||||
_description = 'Student'
|
|
||||||
|
|
||||||
name = fields.Char(string="Name")
|
|
||||||
email = fields.Char(string="Email")
|
|
||||||
phone = fields.Char(string="Phone")
|
|
||||||
|
|
||||||
user_id = fields.Many2one(
|
|
||||||
'res.users',
|
|
||||||
string="User"
|
|
||||||
)
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
class SchoolSubject(models.Model):
|
|
||||||
_name = 'school.subject'
|
|
||||||
_description = 'Subject'
|
|
||||||
|
|
||||||
name = fields.Char(required=True)
|
|
||||||
|
|
||||||
class_id = fields.Many2one(
|
|
||||||
'school.class',
|
|
||||||
string="Class"
|
|
||||||
)
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
class SchoolTeacher(models.Model):
|
|
||||||
_name = 'school.teacher'
|
|
||||||
_description = 'Teacher'
|
|
||||||
|
|
||||||
name = fields.Char(required=True)
|
|
||||||
email = fields.Char()
|
|
||||||
phone = fields.Char()
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<odoo>
|
||||||
|
<record id="module_category_cefope_management" model="ir.module.category">
|
||||||
|
<field name="name">Gestão Escolar CEFOPE</field>
|
||||||
|
<field name="description">Níveis de acesso para o sistema escolar</field>
|
||||||
|
<field name="sequence">10</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="group_cefope_administrator" model="res.groups">
|
||||||
|
<field name="name">Administrador Escolar</field>
|
||||||
|
<field name="category_id" ref="module_category_cefope_management"/>
|
||||||
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||||
|
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="group_cefope_finance" model="res.groups">
|
||||||
|
<field name="name">Responsável Financeiro</field>
|
||||||
|
<field name="category_id" ref="module_category_cefope_management"/>
|
||||||
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="group_cefope_teacher" model="res.groups">
|
||||||
|
<field name="name">Professor</field>
|
||||||
|
<field name="category_id" ref="module_category_cefope_management"/>
|
||||||
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="group_cefope_student" model="res.groups">
|
||||||
|
<field name="name">Estudante</field>
|
||||||
|
<field name="category_id" ref="module_category_cefope_management"/>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
|
||||||
|
<record id="rule_academic_applicant_personal" model="ir.rule">
|
||||||
|
<field name="name">Candidato: Ver apenas a sua própria ficha</field>
|
||||||
|
<field name="model_id" ref="model_academic_applicant"/>
|
||||||
|
<field name="groups" eval="[(4, ref('cefope_core.group_cefope_student'))]"/>
|
||||||
|
<field name="domain_force">[('user_id', '=', user.id)]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="rule_academic_exam_teacher_own" model="ir.rule">
|
||||||
|
<field name="name">Professor: Gerir apenas os seus exames</field>
|
||||||
|
<field name="model_id" ref="model_academic_exam"/>
|
||||||
|
<field name="groups" eval="[(4, ref('cefope_core.group_cefope_teacher'))]"/>
|
||||||
|
<field name="domain_force">[('create_uid', '=', user.id)]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="rule_academic_applicant_finance_all" model="ir.rule">
|
||||||
|
<field name="name">Financeiro: Ver todos os candidatos</field>
|
||||||
|
<field name="model_id" ref="model_academic_applicant"/>
|
||||||
|
<field name="groups" eval="[(4, ref('cefope_core.group_cefope_finance'))]"/>
|
||||||
|
<field name="domain_force">[(1, '=', 1)]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="rule_cefope_admin_all" model="ir.rule">
|
||||||
|
<field name="name">Admin: Acesso Total</field>
|
||||||
|
<field name="model_id" ref="model_academic_applicant"/>
|
||||||
|
<field name="groups" eval="[(4, ref('cefope_core.group_cefope_administrator'))]"/>
|
||||||
|
<field name="domain_force">[(1, '=', 1)]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<record id="group_school_student" model="res.groups">
|
|
||||||
<field name="name">Student</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="group_school_teacher" model="res.groups">
|
|
||||||
<field name="name">Teacher</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="group_school_manager" model="res.groups">
|
|
||||||
<field name="name">School Manager</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
access_student,access_student,model_cefope_student,,1,1,1,1
|
access_academic_applicant_admin,academic.applicant,model_academic_applicant,cefope_core.group_cefope_administrator,1,1,1,1
|
||||||
access_teacher,access_teacher,model_school_teacher,,1,1,1,1
|
access_academic_applicant_finance,academic.applicant,model_academic_applicant,cefope_core.group_cefope_finance,1,1,1,0
|
||||||
access_academic_year,access_academic_year,model_school_academic_year,,1,1,1,1
|
access_academic_applicant_teacher,academic.applicant,model_academic_applicant,cefope_core.group_cefope_teacher,1,1,0,0
|
||||||
access_class,access_class,model_school_class,,1,1,1,1
|
access_academic_applicant_student,academic.applicant,model_academic_applicant,cefope_core.group_cefope_student,1,1,0,0
|
||||||
access_subject,access_subject,model_school_subject,,1,1,1,1
|
access_academic_course_admin,academic.course,model_academic_course,cefope_core.group_cefope_administrator,1,1,1,1
|
||||||
access_enrollment,access_enrollment,model_school_enrollment,,1,1,1,1
|
access_academic_course_finance,academic.course,model_academic_course,cefope_core.group_cefope_finance,1,0,0,0
|
||||||
access_assessment,access_assessment,model_school_assessment,,1,1,1,1
|
access_academic_course_teacher,academic.course,model_academic_course,cefope_core.group_cefope_teacher,1,0,0,0
|
||||||
|
access_academic_course_student,academic.course,model_academic_course,cefope_core.group_cefope_student,1,0,0,0
|
||||||
|
access_academic_exam_admin,academic.exam,model_academic_exam,cefope_core.group_cefope_administrator,1,1,1,1
|
||||||
|
access_academic_exam_finance,academic.exam,model_academic_exam,cefope_core.group_cefope_finance,1,0,0,0
|
||||||
|
access_academic_exam_teacher,academic.exam,model_academic_exam,cefope_core.group_cefope_teacher,1,1,1,1
|
||||||
|
access_academic_exam_student,academic.exam,model_academic_exam,cefope_core.group_cefope_student,1,0,0,0
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<record id="student_own_record_rule" model="ir.rule">
|
|
||||||
<field name="name">Student sees only his record</field>
|
|
||||||
<field name="model_id" ref="model_cefope_student"/>
|
|
||||||
<field name="groups" eval="[(4, ref('meu_projeto.group_school_student'))]"/>
|
|
||||||
<field name="domain_force">[('user_id','=',user.id)]</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="view_academic_applicant_tree" model="ir.ui.view">
|
||||||
|
<field name="name">academic.applicant.list</field>
|
||||||
|
<field name="model">academic.applicant</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<list string="Candidatos" decoration-success="state == 'approved'" decoration-danger="state == 'rejected'" decoration-info="state == 'submitted'">
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="bi"/>
|
||||||
|
<field name="course_id"/>
|
||||||
|
<field name="exam_score" optional="show"/>
|
||||||
|
<field name="state" widget="badge" decoration-success="state == 'approved'" decoration-info="state == 'submitted'" decoration-danger="state == 'rejected'"/>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_academic_applicant_form" model="ir.ui.view">
|
||||||
|
<field name="name">academic.applicant.form</field>
|
||||||
|
<field name="model">academic.applicant</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Ficha do Candidato">
|
||||||
|
<header>
|
||||||
|
<button name="action_submit"
|
||||||
|
string="Submeter Candidatura"
|
||||||
|
type="object"
|
||||||
|
class="oe_highlight"
|
||||||
|
invisible="state != 'draft'"/>
|
||||||
|
|
||||||
|
<button name="action_mark_exam"
|
||||||
|
string="Marcar Exame"
|
||||||
|
type="object"
|
||||||
|
class="oe_highlight"
|
||||||
|
invisible="state != 'submitted'"/>
|
||||||
|
|
||||||
|
<field name="state" widget="statusbar" statusbar_visible="draft,submitted,exam,approved"/>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_title">
|
||||||
|
<label for="name" string="Nome do Candidato"/>
|
||||||
|
<h1>
|
||||||
|
<field name="name" placeholder="Ex: Alício Mussenga"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<group>
|
||||||
|
<group string="Informações Pessoais">
|
||||||
|
<field name="bi"/>
|
||||||
|
<field name="birth_date"/>
|
||||||
|
<field name="gender" widget="radio" options="{'horizontal': true}"/>
|
||||||
|
</group>
|
||||||
|
<group string="Dados da Candidatura">
|
||||||
|
<field name="course_id"/>
|
||||||
|
<field name="exam_id"
|
||||||
|
invisible="state == 'draft'"
|
||||||
|
readonly="state != 'submitted'"/>
|
||||||
|
|
||||||
|
<field name="exam_score"
|
||||||
|
groups="cefope_core.group_cefope_administrator,cefope_core.group_cefope_teacher"
|
||||||
|
readonly="state != 'exam'"
|
||||||
|
invisible="state in ['draft', 'submitted']"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
<notebook>
|
||||||
|
<page string="Histórico Escolar" name="school_history">
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="previous_school"/>
|
||||||
|
<field name="previous_school_type"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="graduation_year"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
|
||||||
|
<page string="Documentos Enviados" name="documents">
|
||||||
|
<group>
|
||||||
|
<group string="Bilhete de Identidade">
|
||||||
|
<field name="photo_bi" widget="image" class="oe_avatar" style="max-width: 200px;"/>
|
||||||
|
</group>
|
||||||
|
<group string="Certificados">
|
||||||
|
<field name="certificate" widget="binary"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
|
||||||
|
<page string="Contactos" name="contacts">
|
||||||
|
<group>
|
||||||
|
<field name="phone"/>
|
||||||
|
<field name="email"/>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_academic_applicant" model="ir.actions.act_window">
|
||||||
|
<field name="name">Candidatos</field>
|
||||||
|
<field name="res_model">academic.applicant</field>
|
||||||
|
<field name="view_mode">list,form</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="view_academic_course_tree" model="ir.ui.view">
|
||||||
|
<field name="name">academic.course.list</field>
|
||||||
|
<field name="model">academic.course</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<list string="Cursos">
|
||||||
|
<field name="code"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="duration"/>
|
||||||
|
<field name="active" widget="boolean_toggle"/>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_academic_course_form" model="ir.ui.view">
|
||||||
|
<field name="name">academic.course.form</field>
|
||||||
|
<field name="model">academic.course</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Curso">
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_title">
|
||||||
|
<label for="name"/>
|
||||||
|
<h1><field name="name" placeholder="Ex: Técnico de Informática"/></h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="code"/>
|
||||||
|
<field name="duration"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="active"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<notebook>
|
||||||
|
<page string="Descrição" name="description">
|
||||||
|
<field name="description" placeholder="Descreva o perfil de saída do curso..."/>
|
||||||
|
</page>
|
||||||
|
<page string="Candidatos Inscritos" name="applicants">
|
||||||
|
<field name="applicant_ids" readonly="1">
|
||||||
|
<list>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="bi"/>
|
||||||
|
<field name="state" widget="badge"/>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_academic_course" model="ir.actions.act_window">
|
||||||
|
<field name="name">Cursos</field>
|
||||||
|
<field name="res_model">academic.course</field>
|
||||||
|
<field name="view_mode">list,form</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="view_academic_exam_tree" model="ir.ui.view">
|
||||||
|
<field name="name">academic.exam.list</field>
|
||||||
|
<field name="model">academic.exam</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<list string="Exames de Acesso">
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="date"/>
|
||||||
|
<field name="room"/>
|
||||||
|
<field name="applicant_count" string="Candidatos"/>
|
||||||
|
<field name="capacity"/>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_academic_exam_calendar" model="ir.ui.view">
|
||||||
|
<field name="name">academic.exam.calendar</field>
|
||||||
|
<field name="model">academic.exam</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<calendar string="Calendário de Exames" date_start="date" color="room">
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="room"/>
|
||||||
|
</calendar>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_academic_exam_form" model="ir.ui.view">
|
||||||
|
<field name="name">academic.academic.exam.form</field>
|
||||||
|
<field name="model">academic.exam</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Exame de Acesso">
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_title">
|
||||||
|
<label for="name" string="Nome do Exame"/>
|
||||||
|
<h1><field name="name" placeholder="Ex: Matemática - Manhã"/></h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="date"/>
|
||||||
|
<field name="room"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="course_id"/>
|
||||||
|
<field name="capacity"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<notebook>
|
||||||
|
<page string="Lista de Chamada" name="applicants">
|
||||||
|
<field name="applicant_ids">
|
||||||
|
<list editable="bottom" create="0" delete="0">
|
||||||
|
<field name="name" readonly="1"/>
|
||||||
|
<field name="bi" readonly="1"/>
|
||||||
|
<field name="exam_score"/> <field name="state" widget="badge"/>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_academic_exam" model="ir.actions.act_window">
|
||||||
|
<field name="name">Exames de Acesso</field>
|
||||||
|
<field name="res_model">academic.exam</field>
|
||||||
|
<field name="view_mode">list,calendar,form</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<menuitem id="menu_cefope_root"
|
||||||
|
name="Gestão Escolar"
|
||||||
|
action="action_academic_applicant"
|
||||||
|
sequence="10"/>
|
||||||
|
|
||||||
|
<menuitem id="menu_academic_admission_root"
|
||||||
|
name="Admissão e Matrículas"
|
||||||
|
parent="menu_cefope_root"
|
||||||
|
sequence="10"/>
|
||||||
|
|
||||||
|
<menuitem id="menu_academic_applicant"
|
||||||
|
name="Candidatos"
|
||||||
|
parent="menu_academic_admission_root"
|
||||||
|
action="action_academic_applicant"
|
||||||
|
sequence="10"/>
|
||||||
|
|
||||||
|
<menuitem id="menu_academic_exam"
|
||||||
|
name="Exames de Acesso"
|
||||||
|
parent="menu_academic_admission_root"
|
||||||
|
action="action_academic_exam"
|
||||||
|
sequence="20"/>
|
||||||
|
|
||||||
|
<menuitem id="menu_academic_config_root"
|
||||||
|
name="Configuração Académica"
|
||||||
|
parent="menu_cefope_root"
|
||||||
|
sequence="20"/>
|
||||||
|
|
||||||
|
<menuitem id="menu_academic_course"
|
||||||
|
name="Cursos"
|
||||||
|
parent="menu_academic_config_root"
|
||||||
|
action="action_academic_course"
|
||||||
|
sequence="10"/>
|
||||||
|
</odoo>
|
||||||
|
|
@ -1,313 +0,0 @@
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<!-- ========================= -->
|
|
||||||
<!-- MENU PRINCIPAL -->
|
|
||||||
<!-- ========================= -->
|
|
||||||
|
|
||||||
<menuitem id="menu_school_root"
|
|
||||||
name="School"/>
|
|
||||||
|
|
||||||
<!-- ========================= -->
|
|
||||||
<!-- STUDENTS -->
|
|
||||||
<!-- ========================= -->
|
|
||||||
|
|
||||||
<record id="view_student_list" model="ir.ui.view">
|
|
||||||
<field name="name">student.list</field>
|
|
||||||
<field name="model">cefope.student</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<list>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="email"/>
|
|
||||||
<field name="phone"/>
|
|
||||||
<field name="user_id"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_student_form" model="ir.ui.view">
|
|
||||||
<field name="name">student.form</field>
|
|
||||||
<field name="model">cefope.student</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="email"/>
|
|
||||||
<field name="phone"/>
|
|
||||||
<field name="user_id"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="action_students" model="ir.actions.act_window">
|
|
||||||
<field name="name">Students</field>
|
|
||||||
<field name="res_model">cefope.student</field>
|
|
||||||
<field name="view_mode">list,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<menuitem id="menu_students"
|
|
||||||
name="Students"
|
|
||||||
parent="menu_school_root"
|
|
||||||
action="action_students"/>
|
|
||||||
|
|
||||||
<!-- ========================= -->
|
|
||||||
<!-- TEACHERS -->
|
|
||||||
<!-- ========================= -->
|
|
||||||
|
|
||||||
<record id="view_teacher_list" model="ir.ui.view">
|
|
||||||
<field name="name">teacher.list</field>
|
|
||||||
<field name="model">school.teacher</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<list>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="email"/>
|
|
||||||
<field name="phone"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_teacher_form" model="ir.ui.view">
|
|
||||||
<field name="name">teacher.form</field>
|
|
||||||
<field name="model">school.teacher</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="email"/>
|
|
||||||
<field name="phone"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="action_teachers" model="ir.actions.act_window">
|
|
||||||
<field name="name">Teachers</field>
|
|
||||||
<field name="res_model">school.teacher</field>
|
|
||||||
<field name="view_mode">list,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<menuitem id="menu_teachers"
|
|
||||||
name="Teachers"
|
|
||||||
parent="menu_school_root"
|
|
||||||
action="action_teachers"/>
|
|
||||||
|
|
||||||
<!-- ========================= -->
|
|
||||||
<!-- ACADEMIC YEAR -->
|
|
||||||
<!-- ========================= -->
|
|
||||||
|
|
||||||
<record id="view_academic_list" model="ir.ui.view">
|
|
||||||
<field name="name">academic.year.list</field>
|
|
||||||
<field name="model">school.academic.year</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<list>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="start_date"/>
|
|
||||||
<field name="end_date"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_academic_form" model="ir.ui.view">
|
|
||||||
<field name="name">academic.year.form</field>
|
|
||||||
<field name="model">school.academic.year</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="start_date"/>
|
|
||||||
<field name="end_date"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="action_academic_year" model="ir.actions.act_window">
|
|
||||||
<field name="name">Academic Years</field>
|
|
||||||
<field name="res_model">school.academic.year</field>
|
|
||||||
<field name="view_mode">list,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<menuitem id="menu_academic_year"
|
|
||||||
name="Academic Years"
|
|
||||||
parent="menu_school_root"
|
|
||||||
action="action_academic_year"/>
|
|
||||||
|
|
||||||
<!-- ========================= -->
|
|
||||||
<!-- CLASSES -->
|
|
||||||
<!-- ========================= -->
|
|
||||||
|
|
||||||
<record id="view_class_list" model="ir.ui.view">
|
|
||||||
<field name="name">class.list</field>
|
|
||||||
<field name="model">school.class</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<list>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="academic_year_id"/>
|
|
||||||
<field name="teacher_id"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_class_form" model="ir.ui.view">
|
|
||||||
<field name="name">class.form</field>
|
|
||||||
<field name="model">school.class</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="academic_year_id"/>
|
|
||||||
<field name="teacher_id"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="action_classes" model="ir.actions.act_window">
|
|
||||||
<field name="name">Classes</field>
|
|
||||||
<field name="res_model">school.class</field>
|
|
||||||
<field name="view_mode">list,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<menuitem id="menu_classes"
|
|
||||||
name="Classes"
|
|
||||||
parent="menu_school_root"
|
|
||||||
action="action_classes"/>
|
|
||||||
|
|
||||||
<!-- ========================= -->
|
|
||||||
<!-- SUBJECTS -->
|
|
||||||
<!-- ========================= -->
|
|
||||||
|
|
||||||
<record id="view_subject_list" model="ir.ui.view">
|
|
||||||
<field name="name">subject.list</field>
|
|
||||||
<field name="model">school.subject</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<list>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="class_id"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_subject_form" model="ir.ui.view">
|
|
||||||
<field name="name">subject.form</field>
|
|
||||||
<field name="model">school.subject</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="class_id"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="action_subjects" model="ir.actions.act_window">
|
|
||||||
<field name="name">Subjects</field>
|
|
||||||
<field name="res_model">school.subject</field>
|
|
||||||
<field name="view_mode">list,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<menuitem id="menu_subjects"
|
|
||||||
name="Subjects"
|
|
||||||
parent="menu_school_root"
|
|
||||||
action="action_subjects"/>
|
|
||||||
|
|
||||||
<!-- ========================= -->
|
|
||||||
<!-- ENROLLMENT -->
|
|
||||||
<!-- ========================= -->
|
|
||||||
|
|
||||||
<record id="view_enrollment_list" model="ir.ui.view">
|
|
||||||
<field name="name">enrollment.list</field>
|
|
||||||
<field name="model">school.enrollment</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<list>
|
|
||||||
<field name="student_id"/>
|
|
||||||
<field name="class_id"/>
|
|
||||||
<field name="academic_year_id"/>
|
|
||||||
<field name="status"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_enrollment_form" model="ir.ui.view">
|
|
||||||
<field name="name">enrollment.form</field>
|
|
||||||
<field name="model">school.enrollment</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="student_id"/>
|
|
||||||
<field name="class_id"/>
|
|
||||||
<field name="academic_year_id"/>
|
|
||||||
<field name="status"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="action_enrollments" model="ir.actions.act_window">
|
|
||||||
<field name="name">Enrollments</field>
|
|
||||||
<field name="res_model">school.enrollment</field>
|
|
||||||
<field name="view_mode">list,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<menuitem id="menu_enrollments"
|
|
||||||
name="Enrollments"
|
|
||||||
parent="menu_school_root"
|
|
||||||
action="action_enrollments"/>
|
|
||||||
|
|
||||||
<!-- ========================= -->
|
|
||||||
<!-- ASSESSMENT -->
|
|
||||||
<!-- ========================= -->
|
|
||||||
|
|
||||||
<record id="view_assessment_list" model="ir.ui.view">
|
|
||||||
<field name="name">assessment.list</field>
|
|
||||||
<field name="model">school.assessment</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<list>
|
|
||||||
<field name="enrollment_id"/>
|
|
||||||
<field name="subject_id"/>
|
|
||||||
<field name="grade"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_assessment_form" model="ir.ui.view">
|
|
||||||
<field name="name">assessment.form</field>
|
|
||||||
<field name="model">school.assessment</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="enrollment_id"/>
|
|
||||||
<field name="subject_id"/>
|
|
||||||
<field name="grade"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="action_assessment" model="ir.actions.act_window">
|
|
||||||
<field name="name">Assessments</field>
|
|
||||||
<field name="res_model">school.assessment</field>
|
|
||||||
<field name="view_mode">list,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<menuitem id="menu_assessments"
|
|
||||||
name="Assessments"
|
|
||||||
parent="menu_school_root"
|
|
||||||
action="action_assessment"/>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
Loading…
Reference in New Issue