73 lines
3.3 KiB
XML
73 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_transport_incident_list" model="ir.ui.view">
|
|
<field name="name">education.transport.incident.list</field>
|
|
<field name="model">education.transport.incident</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Incidents" decoration-danger="severity == 'critical'" decoration-warning="severity == 'high'" decoration-muted="state == 'closed'">
|
|
<field name="name"/>
|
|
<field name="trip_id"/>
|
|
<field name="vehicle_id"/>
|
|
<field name="driver_id"/>
|
|
<field name="incident_type"/>
|
|
<field name="severity" widget="badge"
|
|
decoration-danger="severity == 'critical'"
|
|
decoration-warning="severity == 'high'"
|
|
decoration-info="severity == 'medium'"
|
|
decoration-success="severity == 'low'"/>
|
|
<field name="state" widget="badge"
|
|
decoration-danger="state == 'reported'"
|
|
decoration-warning="state == 'investigating'"
|
|
decoration-success="state == 'resolved'"
|
|
decoration-muted="state == 'closed'"/>
|
|
<field name="incident_date"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_transport_incident_form" model="ir.ui.view">
|
|
<field name="name">education.transport.incident.form</field>
|
|
<field name="model">education.transport.incident</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Incident">
|
|
<header>
|
|
<field name="state" widget="statusbar" statusbar_visible="reported,investigating,resolved,closed" options="{'clickable': '1'}"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1><field name="name" readonly="1"/></h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="trip_id"/>
|
|
<field name="vehicle_id"/>
|
|
<field name="driver_id"/>
|
|
<field name="student_id"/>
|
|
</group>
|
|
<group>
|
|
<field name="incident_type"/>
|
|
<field name="severity"/>
|
|
<field name="incident_date"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Description">
|
|
<field name="description" placeholder="Describe the incident..."/>
|
|
</page>
|
|
<page string="Action Taken">
|
|
<field name="action_taken" placeholder="Describe actions taken..."/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_transport_incident_list" model="ir.actions.act_window">
|
|
<field name="name">Incidents</field>
|
|
<field name="res_model">education.transport.incident</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
</odoo>
|