323 lines
18 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Tree View -->
<record id="view_education_student_tree" model="ir.ui.view">
<field name="name">education.student.tree</field>
<field name="model">education.student</field>
<field name="arch" type="xml">
<list string="Students" decoration-info="status == 'draft'" decoration-success="status == 'active'" decoration-warning="status == 'on_leave'" decoration-danger="status in ['withdrawn', 'cancelled']">
<field name="admission_number"/>
<field name="full_name" string="Student Name"/>
<field name="department_id"/>
<field name="program_id"/>
<field name="academic_year_id"/>
<field name="phone"/>
<field name="status"/>
<field name="company_id" groups="base.group_multi_company"/>
</list>
</field>
</record>
<!-- Kanban View -->
<record id="view_education_student_kanban" model="ir.ui.view">
<field name="name">education.student.kanban</field>
<field name="model">education.student</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="id"/>
<field name="full_name"/>
<field name="admission_number"/>
<field name="program_id"/>
<field name="department_id"/>
<field name="status"/>
<field name="image"/>
<templates>
<t t-name="card">
<div class="oe_kanban_global_click o_kanban_record_has_image_fill">
<t t-if="record.image.raw_value">
<div class="o_kanban_image_fill_left d-none d-md-block" t-attf-style="background-image:url('#{kanban_image('education.student', 'image', record.id.raw_value)}')"/>
</t>
<t t-else="">
<div class="o_kanban_image_fill_left d-none d-md-block" style="background-image:url('/web/static/img/placeholder.png')"/>
</t>
<div class="oe_kanban_details">
<strong class="o_kanban_record_title">
<field name="full_name"/>
</strong>
<div class="o_kanban_record_subtitle">
<span>ID: <field name="admission_number"/></span>
</div>
<div>
<span class="text-muted"><field name="program_id"/></span>
</div>
<div>
<span class="text-muted"><field name="department_id"/></span>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left"/>
<div class="oe_kanban_bottom_right">
<field name="status" widget="label_selection" options="{'classes': {'draft': 'info', 'active': 'success', 'on_leave': 'warning', 'graduated': 'primary', 'withdrawn': 'danger', 'cancelled': 'danger'}}"/>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Form View -->
<record id="view_education_student_form" model="ir.ui.view">
<field name="name">education.student.form</field>
<field name="model">education.student</field>
<field name="arch" type="xml">
<form string="Student">
<header>
<button name="action_admit" string="Admit" type="object" class="oe_highlight" invisible="status != 'draft'"/>
<button name="action_activate" string="Activate" type="object" class="oe_highlight" invisible="status != 'admitted'"/>
<button name="action_on_leave" string="On Leave" type="object" invisible="status != 'active'"/>
<button name="action_graduate" string="Graduate" type="object" class="oe_highlight" invisible="status != 'active'"/>
<button name="action_withdraw" string="Withdraw" type="object" invisible="status not in ['active', 'on_leave']"/>
<button name="action_cancel" string="Cancel" type="object" invisible="status not in ['draft', 'admitted']"/>
<button name="action_draft" string="Reset to Draft" type="object" invisible="status not in ['withdrawn', 'cancelled']"/>
<field name="status" widget="statusbar" statusbar_visible="draft,admitted,active,graduated"/>
</header>
<sheet>
<!-- Smart Buttons Placeholder -->
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" icon="fa-money" type="object" name="action_draft" string="Fees">
<div class="o_stat_info">
<span class="o_stat_value">0</span>
<span class="o_stat_text">Fees</span>
</div>
</button>
<button class="oe_stat_button" icon="fa-credit-card" type="object" name="action_draft" string="Payments">
<div class="o_stat_info">
<span class="o_stat_value">0</span>
<span class="o_stat_text">Payments</span>
</div>
</button>
<button class="oe_stat_button" icon="fa-file-text-o" type="object" name="action_draft" string="Receipts">
<div class="o_stat_info">
<span class="o_stat_value">0</span>
<span class="o_stat_text">Receipts</span>
</div>
</button>
<button class="oe_stat_button" icon="fa-calendar-check-o" type="object" name="action_draft" string="Attendance">
<div class="o_stat_info">
<span class="o_stat_value">0</span>
<span class="o_stat_text">Attendance</span>
</div>
</button>
<button class="oe_stat_button" icon="fa-folder-open-o" type="object" name="action_draft" string="Documents">
<div class="o_stat_info">
<span class="o_stat_value">0</span>
<span class="o_stat_text">Documents</span>
</div>
</button>
</div>
<!-- Avatar -->
<field name="image" widget="image" class="oe_avatar" options="{'preview_image': 'image_1920'}"/>
<div class="oe_title">
<label for="first_name" class="oe_edit_only"/>
<h1>
<div class="d-flex gap-2">
<field name="first_name" placeholder="First Name" style="width: 33%%" required="1"/>
<field name="middle_name" placeholder="Middle Name" style="width: 33%%"/>
<field name="last_name" placeholder="Last Name" style="width: 33%%" required="1"/>
</div>
</h1>
<h3>
<field name="full_name" readonly="1" class="oe_inline"/>
</h3>
</div>
<group>
<group>
<field name="admission_number"/>
<field name="student_id"/>
</group>
<group>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
<notebook>
<!-- General Tab -->
<page string="General" name="general">
<group>
<group>
<field name="gender"/>
<field name="date_of_birth"/>
<field name="age" readonly="1"/>
<field name="blood_group"/>
</group>
<group>
<field name="nationality"/>
<field name="religion"/>
<field name="marital_status"/>
<field name="identification_number"/>
<field name="place_of_birth"/>
</group>
</group>
</page>
<!-- Academic Tab -->
<page string="Academic" name="academic">
<group>
<group string="Academic Level &amp; Program">
<field name="campus_id"/>
<field name="department_id"/>
<field name="program_id"/>
<field name="level_id"/>
</group>
<group string="Academic Terms &amp; Cohort">
<field name="academic_year_id"/>
<field name="academic_term_id"/>
<field name="batch_id"/>
<field name="semester_id"/>
<field name="current_semester_id"/>
<field name="section_id"/>
</group>
<group string="Identifiers">
<field name="roll_number"/>
<field name="registration_number"/>
<field name="admission_type"/>
</group>
<group string="Dates">
<field name="admission_date"/>
<field name="enrollment_date" readonly="1"/>
<field name="graduation_date" readonly="status != 'active'"/>
<field name="leave_date" readonly="1"/>
</group>
</group>
</page>
<!-- Guardian Tab -->
<page string="Guardian" name="guardian">
<group>
<group string="Father details">
<field name="father_name"/>
<field name="father_occupation"/>
<field name="father_phone"/>
</group>
<group string="Mother details">
<field name="mother_name"/>
<field name="mother_occupation"/>
<field name="mother_phone"/>
</group>
<group string="Guardian details" colspan="2">
<group>
<field name="guardian_name"/>
<field name="guardian_relation"/>
<field name="guardian_phone"/>
<field name="guardian_mobile"/>
</group>
<group>
<field name="guardian_email"/>
<field name="guardian_occupation"/>
<field name="guardian_address"/>
</group>
</group>
</group>
</page>
<!-- Contact Tab -->
<page string="Contact" name="contact">
<group>
<group string="Address Details">
<span class="o_address_layout">
<field name="street" placeholder="Address Line 1..." class="o_address_street"/>
<field name="street2" placeholder="Address Line 2..." class="o_address_street"/>
<field name="city" placeholder="City" class="o_address_city"/>
<field name="state_id" placeholder="State" class="o_address_state" options="{'no_open': True, 'no_quick_create': True}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
<field name="country_id" placeholder="Country" class="o_address_country" options="{'no_open': True, 'no_quick_create': True}"/>
</span>
</group>
<group string="Contact Info">
<field name="email"/>
<field name="phone"/>
<field name="mobile"/>
<field name="emergency_contact"/>
<field name="emergency_phone"/>
</group>
</group>
</page>
<!-- Documents Tab -->
<page string="Documents" name="documents">
<group>
<group string="Identity Documents">
<field name="doc_passport" filename="doc_passport_name"/>
<field name="doc_passport_name" invisible="1"/>
<field name="doc_aadhaar" filename="doc_aadhaar_name"/>
<field name="doc_aadhaar_name" invisible="1"/>
</group>
<group string="Certificates">
<field name="doc_birth_cert" filename="doc_birth_cert_name"/>
<field name="doc_birth_cert_name" invisible="1"/>
<field name="doc_transfer_cert" filename="doc_transfer_cert_name"/>
<field name="doc_transfer_cert_name" invisible="1"/>
<field name="doc_community_cert" filename="doc_community_cert_name"/>
<field name="doc_community_cert_name" invisible="1"/>
<field name="doc_mark_sheets" filename="doc_mark_sheets_name"/>
<field name="doc_mark_sheets_name" invisible="1"/>
</group>
</group>
</page>
<!-- Notes Tab -->
<page string="Notes" name="notes">
<field name="notes" placeholder="Internal notes..."/>
</page>
</notebook>
</sheet>
<!-- Chatter -->
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<!-- Search View -->
<record id="view_education_student_search" model="ir.ui.view">
<field name="name">education.student.search</field>
<field name="model">education.student</field>
<field name="arch" type="xml">
<search string="Students">
<field name="name" string="Name" filter_domain="['|', '|', ('first_name', 'ilike', self), ('middle_name', 'ilike', self), ('last_name', 'ilike', self)]"/>
<field name="student_id"/>
<field name="admission_number"/>
<field name="roll_number"/>
<field name="phone"/>
<field name="email"/>
<field name="department_id"/>
<field name="program_id"/>
<field name="campus_id"/>
<field name="academic_year_id"/>
<filter string="Active Students" name="active_students" domain="[('status', '=', 'active')]"/>
<filter string="Graduated" name="graduated" domain="[('status', '=', 'graduated')]"/>
<filter string="Withdrawn" name="withdrawn" domain="[('status', '=', 'withdrawn')]"/>
<filter string="Cancelled" name="cancelled" domain="[('status', '=', 'cancelled')]"/>
<group>
<filter string="Campus" name="group_campus" context="{'group_by': 'campus_id'}"/>
<filter string="Department" name="group_department" context="{'group_by': 'department_id'}"/>
<filter string="Program" name="group_program" context="{'group_by': 'program_id'}"/>
<filter string="Academic Year" name="group_year" context="{'group_by': 'academic_year_id'}"/>
<filter string="Academic Level" name="group_level" context="{'group_by': 'level_id'}"/>
<filter string="Status" name="group_status" context="{'group_by': 'status'}"/>
</group>
</search>
</field>
</record>
</odoo>