Metatron_Student_ERP/addons/education_exam/views/education_exam_views.xml
2026-09-21 11:03:19 +05:30

131 lines
6.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Exam Type Views -->
<record id="view_education_exam_type_tree" model="ir.ui.view">
<field name="name">education.exam.type.tree</field>
<field name="model">education.exam.type</field>
<field name="arch" type="xml">
<list>
<field name="name"/>
<field name="code"/>
<field name="weightage"/>
</list>
</field>
</record>
<record id="view_education_exam_type_form" model="ir.ui.view">
<field name="name">education.exam.type.form</field>
<field name="model">education.exam.type</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="name"/>
<field name="code"/>
<field name="weightage"/>
<field name="description"/>
<field name="active" invisible="1"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="action_education_exam_type" model="ir.actions.act_window">
<field name="name">Exam Types</field>
<field name="res_model">education.exam.type</field>
<field name="view_mode">list,form</field>
</record>
<!-- Exam Views -->
<record id="view_education_exam_tree" model="ir.ui.view">
<field name="name">education.exam.tree</field>
<field name="model">education.exam</field>
<field name="arch" type="xml">
<list>
<field name="name"/>
<field name="exam_type_id"/>
<field name="program_id"/>
<field name="term_id"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="state" widget="badge" decoration-info="state == 'scheduled'" decoration-warning="state == 'ongoing'" decoration-success="state == 'completed' or state == 'results_published'"/>
</list>
</field>
</record>
<record id="view_education_exam_form" model="ir.ui.view">
<field name="name">education.exam.form</field>
<field name="model">education.exam</field>
<field name="arch" type="xml">
<form>
<header>
<button name="action_schedule" string="Schedule" type="object" invisible="state != 'draft'" class="oe_highlight"/>
<button name="action_start" string="Start Exam" type="object" invisible="state != 'scheduled'" class="oe_highlight"/>
<button name="action_complete" string="Complete" type="object" invisible="state != 'ongoing'" class="oe_highlight"/>
<button name="action_generate_results" string="Generate Results" type="object" invisible="state != 'completed'" class="oe_highlight"/>
<button name="action_publish_results" string="Publish Results" type="object" invisible="state != 'completed'" class="oe_highlight"/>
<button name="action_reset_draft" string="Reset to Draft" type="object" invisible="state not in ('scheduled', 'ongoing', 'completed')"/>
<field name="state" widget="statusbar" statusbar_visible="draft,scheduled,ongoing,completed,results_published"/>
</header>
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name" placeholder="E.g. Fall 2026 Semester Exams"/></h1>
</div>
<group>
<group string="Academic Information">
<field name="code"/>
<field name="academic_year_id"/>
<field name="program_id"/>
<field name="term_id"/>
</group>
<group string="Exam Information">
<field name="exam_type_id"/>
<field name="grading_system_id"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="result_published_date" invisible="state != 'results_published'"/>
</group>
</group>
<notebook>
<page string="Schedule" name="schedule">
<field name="line_ids">
<list editable="bottom">
<field name="subject_id"/>
<field name="exam_date"/>
<field name="start_time" widget="float_time"/>
<field name="end_time" widget="float_time"/>
<field name="max_marks"/>
<field name="pass_marks"/>
<field name="room"/>
<field name="venue"/>
<field name="faculty_id"/>
</list>
</field>
</page>
<page string="Results" name="results">
<field name="result_ids" readonly="1">
<list>
<field name="student_id"/>
<field name="total_obtained_marks"/>
<field name="percentage"/>
<field name="grade_id"/>
<field name="result_status"/>
<field name="published"/>
</list>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="action_education_exam" model="ir.actions.act_window">
<field name="name">Exams</field>
<field name="res_model">education.exam</field>
<field name="view_mode">list,form</field>
</record>
</odoo>