Odoo_Dance_SCL/addons/dance_web/views/enrollment_request_views.xml
2026-09-28 11:03:02 +05:30

141 lines
6.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_dance_enrollment_request_tree" model="ir.ui.view">
<field name="name">dance.enrollment.request.tree</field>
<field name="model">dance.enrollment.request</field>
<field name="arch" type="xml">
<tree string="Enrollment Requests"
decoration-info="state == 'new'"
decoration-warning="state == 'contacted'"
decoration-success="state == 'converted'"
decoration-muted="state == 'rejected'">
<field name="reference"/>
<field name="student_name"/>
<field name="guardian_name"/>
<field name="guardian_phone"/>
<field name="dance_style"/>
<field name="batch_id"/>
<field name="create_date"/>
<field name="state" widget="badge"
decoration-info="state == 'new'"
decoration-warning="state == 'contacted'"
decoration-success="state == 'converted'"
decoration-danger="state == 'rejected'"/>
</tree>
</field>
</record>
<record id="view_dance_enrollment_request_form" model="ir.ui.view">
<field name="name">dance.enrollment.request.form</field>
<field name="model">dance.enrollment.request</field>
<field name="arch" type="xml">
<form string="Enrollment Request">
<header>
<button name="action_mark_contacted" string="Mark Contacted"
type="object" class="btn-secondary"
invisible="state != 'new'"/>
<button name="action_approve" string="Approve"
type="object" class="btn-primary"
invisible="state not in ('new', 'contacted')"/>
<button name="action_convert" string="Convert to Enrollment"
type="object" class="btn-primary"
invisible="state != 'approved'"/>
<button name="action_reject" string="Reject"
type="object"
invisible="state in ('converted', 'rejected')"/>
<button name="action_reset_to_new" string="Reset to New"
type="object"
invisible="state != 'rejected'"/>
<field name="state" widget="statusbar"
statusbar_visible="new,contacted,approved,converted"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_open_student" type="object"
class="oe_stat_button" icon="fa-user"
invisible="not student_id">
<div class="o_stat_info">
<span class="o_stat_text">Student</span>
</div>
</button>
</div>
<div class="oe_title">
<h1><field name="reference" readonly="1"/></h1>
</div>
<group>
<group string="Student">
<field name="student_name"/>
<field name="date_of_birth"/>
<field name="gender"/>
<field name="dance_style"/>
<field name="preferred_level"/>
<field name="batch_id"/>
</group>
<group string="Parent / Guardian">
<field name="guardian_name"/>
<field name="guardian_email" widget="email"/>
<field name="guardian_phone" widget="phone"/>
</group>
</group>
<group string="Message" invisible="not message">
<field name="message" nolabel="1"/>
</group>
<group string="Conversion Result"
invisible="state != 'converted'">
<field name="student_id"/>
<field name="enrollment_id"/>
<field name="portal_user_id"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="view_dance_enrollment_request_search" model="ir.ui.view">
<field name="name">dance.enrollment.request.search</field>
<field name="model">dance.enrollment.request</field>
<field name="arch" type="xml">
<search string="Enrollment Requests">
<field name="reference"/>
<field name="student_name"/>
<field name="guardian_name"/>
<field name="guardian_phone"/>
<filter name="filter_new" string="New" domain="[('state', '=', 'new')]"/>
<filter name="filter_contacted" string="Contacted" domain="[('state', '=', 'contacted')]"/>
<filter name="filter_approved" string="Approved" domain="[('state', '=', 'approved')]"/>
<filter name="filter_converted" string="Enrolled" domain="[('state', '=', 'converted')]"/>
<separator/>
<filter name="filter_open" string="Open"
domain="[('state', 'not in', ('converted', 'rejected'))]"/>
<group expand="0" string="Group By">
<filter name="group_state" string="Status" context="{'group_by': 'state'}"/>
<filter name="group_style" string="Dance Style" context="{'group_by': 'dance_style'}"/>
</group>
</search>
</field>
</record>
<record id="action_dance_enrollment_request" model="ir.actions.act_window">
<field name="name">Enrollment Requests</field>
<field name="res_model">dance.enrollment.request</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_filter_open': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">No enrollment requests yet</p>
<p>Requests submitted through the website "Enroll Now" form appear here.</p>
</field>
</record>
<menuitem id="menu_dance_enrollment_requests"
name="Enrollment Requests"
parent="dance_student.menu_dance_root"
action="action_dance_enrollment_request"
sequence="35"/>
</odoo>