119 lines
6.3 KiB
XML
119 lines
6.3 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
|
|
<record id="helpdesk_sla_view_tree" model="ir.ui.view">
|
|
<field name="name">helpdesk.sla.list</field>
|
|
<field name="model">helpdesk.sla</field>
|
|
<field name="arch" type="xml">
|
|
<list string="SLA Policies" multi_edit="1" sample="1" default_order="team_id">
|
|
<field name="company_id" column_invisible="True"/>
|
|
<field name="name"/>
|
|
<field name="team_id" optional="show" readonly="1"/>
|
|
<field name="priority" optional="show" widget="priority"/>
|
|
<field name="tag_ids" widget="many2many_tags" optional="hide" options="{'color_field': 'color'}"/>
|
|
<field name="partner_ids" domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" widget="many2many_tags" optional="hide"/>
|
|
<field name="stage_id" optional="show" string="Reach Stage" readonly="1"/>
|
|
<field name="time" optional="show" widget="float_time"/>
|
|
<field name="exclude_stage_ids" widget="many2many_tags" optional="hide" readonly="1"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="helpdesk_sla_view_kanban" model="ir.ui.view">
|
|
<field name="name">helpdesk.sla.kanban</field>
|
|
<field name="model">helpdesk.sla</field>
|
|
<field name="arch" type="xml">
|
|
<kanban sample="1" default_order="team_id">
|
|
<templates>
|
|
<t t-name="card">
|
|
<field name="name" class="fw-bolder fs-5"/>
|
|
<field name="team_id"/>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="helpdesk_sla_view_search" model="ir.ui.view">
|
|
<field name="name">helpdesk.sla.search</field>
|
|
<field name="model">helpdesk.sla</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search SLA Policies">
|
|
<field name="name"/>
|
|
<field name="team_id"/>
|
|
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
|
|
<group expand="0" string="Group By">
|
|
<filter string="Helpdesk Team" name="team" context="{'group_by':'team_id'}"/>
|
|
<filter string="Company" name="company" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="helpdesk_sla_view_form" model="ir.ui.view">
|
|
<field name="name">helpdesk.sla.form</field>
|
|
<field name="model">helpdesk.sla</field>
|
|
<field name="arch" type="xml">
|
|
<form string="SLA Policy">
|
|
<sheet>
|
|
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button class="oe_stat_button" type="object" name="action_open_helpdesk_ticket" icon="fa-life-ring" invisible="ticket_count == 0">
|
|
<field name="ticket_count" widget="statinfo" string="Tickets"/>
|
|
</button>
|
|
</div>
|
|
<div class="oe_title">
|
|
<h1>
|
|
<field name="name" placeholder="e.g. Close urgent tickets within 36 hours"/>
|
|
</h1>
|
|
</div>
|
|
<field name="description" placeholder="Description of the policy..."/>
|
|
<group>
|
|
<group>
|
|
<field name="active" invisible="1"/>
|
|
<field name="company_id" invisible="1"/>
|
|
<separator colspan="2" string="Criteria"/>
|
|
<div class="text-muted mb32" colspan="2">This SLA Policy will apply to tickets matching ALL of the following criteria:</div>
|
|
<field name="team_id" domain="[('use_sla', '=', True)]"/>
|
|
<field name="priority" widget="priority"/>
|
|
<label for="tag_ids"/>
|
|
<div class="d-flex justify-content-center">
|
|
<field name="tag_ids" class="" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
|
|
<div class="text-end text-muted col-4">(any of these tags)</div>
|
|
</div>
|
|
<label for="partner_ids"/>
|
|
<div class="d-md-flex" name="partners">
|
|
<field name="partner_ids" widget="many2many_tags"
|
|
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]"/>
|
|
</div>
|
|
|
|
<separator colspan="2" string="Target" class="mt32"/>
|
|
<field name="stage_id" string="Reach Stage" domain="[('team_ids', '=', team_id), ('id', 'not in', exclude_stage_ids)]" required="1" context="{'default_team_ids': team_id and [(6, 0, [team_id])]}"/>
|
|
<label for="time"/>
|
|
<div class="o_row">
|
|
<field name="time" widget="float_time" class="oe_inline"/><span class="o_field_widget o_readonly_modifier">Working Hours</span>
|
|
</div>
|
|
<field name="exclude_stage_ids" widget="many2many_tags" domain="[('id', '!=', stage_id), ('team_ids', '=', team_id)]" context="{'default_team_ids': team_id and [(6, 0, [team_id])]}"/>
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="helpdesk_sla_action_main" model="ir.actions.act_window">
|
|
<field name="name">SLA Policies</field>
|
|
<field name="res_model">helpdesk.sla</field>
|
|
<field name="path">sla-policies</field>
|
|
<field name="view_mode">list,form,kanban</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No SLA policies found. Let's create one!
|
|
</p><p>
|
|
Make sure tickets are handled on time by using SLA Policies.<br/>
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|