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

74 lines
3.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_education_student_scholarship_tree" model="ir.ui.view">
<field name="name">education.student.scholarship.tree</field>
<field name="model">education.student.scholarship</field>
<field name="arch" type="xml">
<list string="Student Scholarships">
<field name="scholarship_name"/>
<field name="student_id"/>
<field name="type"/>
<field name="amount"/>
<field name="sponsor"/>
<field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'confirmed'" decoration-danger="state == 'cancelled'"/>
</list>
</field>
</record>
<record id="view_education_student_scholarship_form" model="ir.ui.view">
<field name="name">education.student.scholarship.form</field>
<field name="model">education.student.scholarship</field>
<field name="arch" type="xml">
<form string="Student Scholarship">
<header>
<button name="action_confirm" string="Confirm Scholarship" type="object" class="oe_highlight" invisible="state != 'draft'"/>
<button name="action_cancel" string="Cancel Scholarship" type="object" invisible="state != 'confirmed'"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed"/>
</header>
<sheet>
<div class="oe_title">
<label for="scholarship_name" class="oe_edit_only"/>
<h1><field name="scholarship_name" placeholder="Scholarship Name e.g. Merit Scholarship" readonly="state != 'draft'"/></h1>
</div>
<group>
<group>
<field name="student_id" readonly="state != 'draft'"/>
<field name="type" readonly="state != 'draft'"/>
<field name="amount" readonly="state != 'draft'"/>
</group>
<group>
<field name="sponsor" readonly="state != 'draft'"/>
<field name="validity" readonly="state != 'draft'"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_education_student_scholarship_search" model="ir.ui.view">
<field name="name">education.student.scholarship.search</field>
<field name="model">education.student.scholarship</field>
<field name="arch" type="xml">
<search string="Student Scholarships">
<field name="scholarship_name"/>
<field name="student_id"/>
<field name="sponsor"/>
<filter string="Confirmed" name="confirmed" domain="[('state', '=', 'confirmed')]"/>
<group>
<filter string="Student" name="group_student" context="{'group_by': 'student_id'}"/>
<filter string="Status" name="group_status" context="{'group_by': 'state'}"/>
</group>
</search>
</field>
</record>
<record id="action_education_student_scholarship" model="ir.actions.act_window">
<field name="name">Scholarships</field>
<field name="res_model">education.student.scholarship</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_education_student_scholarship_search"/>
</record>
</odoo>