Metatron_Student_ERP/addons/education_hostel/views/hostel_complaint_views.xml

81 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_hostel_complaint_list" model="ir.ui.view">
<field name="name">education.hostel.complaint.list</field>
<field name="model">education.hostel.complaint</field>
<field name="arch" type="xml">
<list string="Complaints"
decoration-danger="priority == '3'"
decoration-warning="priority == '2'"
decoration-muted="state == 'closed'">
<field name="name"/>
<field name="student_id"/>
<field name="hostel_id"/>
<field name="category"/>
<field name="title"/>
<field name="priority" widget="priority"/>
<field name="state" widget="badge"
decoration-warning="state == 'submitted'"
decoration-info="state == 'in_progress'"
decoration-success="state == 'resolved'"
decoration-muted="state == 'closed'"/>
<field name="submitted_date"/>
<field name="assigned_to"/>
</list>
</field>
</record>
<record id="view_hostel_complaint_form" model="ir.ui.view">
<field name="name">education.hostel.complaint.form</field>
<field name="model">education.hostel.complaint</field>
<field name="arch" type="xml">
<form string="Complaint">
<header>
<button name="action_submit" string="Submit" type="object"
class="btn-primary" invisible="state != 'draft'"/>
<button name="action_start_progress" string="Start Progress" type="object"
invisible="state != 'submitted'"/>
<button name="action_resolve" string="Mark Resolved" type="object"
invisible="state != 'in_progress'"/>
<button name="action_close" string="Close" type="object"
invisible="state != 'resolved'"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,submitted,in_progress,resolved,closed"/>
</header>
<sheet>
<div class="oe_title">
<h1><field name="name" readonly="1"/></h1>
<h2><field name="title" placeholder="Complaint Title"/></h2>
</div>
<group>
<group>
<field name="student_id"/>
<field name="hostel_id"/>
<field name="room_id"
domain="[('hostel_id','=',hostel_id)]"/>
<field name="submitted_date"/>
</group>
<group>
<field name="category"/>
<field name="priority" widget="priority"/>
<field name="assigned_to"/>
<field name="resolved_date"/>
</group>
</group>
<field name="description" placeholder="Describe the issue..."/>
<field name="resolution" placeholder="Resolution notes..."
invisible="state not in ('in_progress','resolved','closed')"/>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="action_hostel_complaint_list" model="ir.actions.act_window">
<field name="name">Hostel Complaints</field>
<field name="res_model">education.hostel.complaint</field>
<field name="view_mode">list,form</field>
<field name="context">{'search_default_state': 'submitted'}</field>
</record>
</odoo>