flectra/addons/helpdesk_basic/views/helpdesk_ticket_view.xml

260 lines
13 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<record id="view_helpdesk_form" model="ir.ui.view">
<field name="name">Helpdesk Form</field>
<field name="model">helpdesk.ticket</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Helpdesk">
<header>
<field name="stage_id" widget="statusbar" clickable="True"
options="{'fold_field': 'fold'}"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="toggle_active"
type="object" icon="fa-archive">
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button>
<button class="oe_stat_button" type="object"
name="action_get_attachments" icon="fa-file">
<field string="Attachments"
name="attachments_count" widget="statinfo"/>
</button>
</div>
<div class="oe_title">
<h1>
<field name="sequence" readonly="1"/>
</h1>
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" placeholder="Issue Details"
required="True"/>
</h1>
</div>
<group>
<group>
<field name="user_id" required="1"/>
<field name="partner_id" readonly="1"/>
<field name="is_accessible" invisible="1"/>
<field name="is_assigned" invisible="1"/>
<field name="issue_type_id"
options='{"no_open": True}'/>
<field name="assigned_to_id"
options='{"no_open": True}'/>
<field name="priority" widget="priority"/>
</group>
<group>
<field name="start_date"/>
<field name="end_date"/>
<field name="team_id"/>
<field name="tag_ids" widget="many2many_tags"/>
</group>
</group>
<notebook>
<page name="description" string="Description">
<field name="description"/>
<field name="attachment_ids" invisible="1"/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"
widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_helpdesk_tree" model="ir.ui.view">
<field name="name">Helpdesk Tree View</field>
<field name="model">helpdesk.ticket</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="user_id"/>
<field name="partner_id"/>
<field name="team_id"/>
<field name="assigned_to_id"/>
<field name="stage_id"/>
</tree>
</field>
</record>
<record id="view_helpdesk_search" model="ir.ui.view">
<field name="name">Helpdesk Search</field>
<field name="model">helpdesk.ticket</field>
<field name="arch" type="xml">
<search string="Search for Helpdesk">
<field name="name" string="Helpdesk"
filter_domain="[('name','ilike',self)]"/>
<field name="team_id" string="Team"/>
<field name="user_id" string="Created By"/>
<field name="issue_type_id" string="Issue Type"/>
<field name="partner_id" string="Related Partner"/>
<field name="assigned_to_id" string="Assigned To"/>
<field name="stage_id" string="Status"/>
<filter string="Archived" domain="[('active','=',False)]"/>
<group expand="0" string="Group By...">
<filter string="Status" domain="[]"
context="{'group_by':'stage_id'}"/>
<filter string="Company" domain="[]"
context="{'group_by':'company_id'}"
groups="base.group_multi_company"/>
<filter string="Team" domain="[]"
context="{'group_by':'team_id'}"/>
<filter string="Created By" domain="[]"
context="{'group_by':'user_id'}"/>
<filter string="Related Partner" domain="[]"
context="{'group_by':'partner_id'}"/>
<filter string="Assigned To" domain="[]"
context="{'group_by':'assigned_to_id'}"/>
<filter string="Issue Type" domain="[]"
context="{'group_by':'issue_type_id'}"/>
</group>
</search>
</field>
</record>
<record model="ir.ui.view" id="view_helpdesk_pivot">
<field name="name">helpdesk.pivot</field>
<field name="model">helpdesk.ticket</field>
<field name="arch" type="xml">
<pivot string="Helpdesk">
<field name="name" type="row"/>
<field name="user_id" type="col"/>
</pivot>
</field>
</record>
<record model="ir.ui.view" id="helpdesk_kanban_view">
<field name="name">helpdesk.ticket.kanban</field>
<field name="model">helpdesk.ticket</field>
<field name="arch" type="xml">
<kanban default_group_by="stage_id"
class="o_kanban_small_column o_kanban_project_tasks"
on_create="quick_create">
<field name="id"/>
<field name="name"/>
<field name="team_id"/>
<field name="assigned_to_id"/>
<field name="user_id"/>
<field name="partner_id"/>
<field name="color"/>
<field name="priority"/>
<field name="stage_id"
options='{"group_by_tooltip": {"description": "Stage Description"}}'/>
<field name="description"/>
<field name="sequence"/>
<field name="active"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_kanban_content">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title">
<field name="name"/>
</strong>
<br/>
</div>
<div class="o_dropdown_kanban dropdown"
groups="base.group_user">
<a class="dropdown-toggle btn"
data-toggle="dropdown" href="#">
<span class="fa fa-ellipsis-v"
aria-hidden="true"/>
</a>
<ul class="dropdown-menu" role="menu"
aria-labelledby="dLabel">
<li t-if="widget.editable">
<a type="edit">Edit Ticket</a>
</li>
<li t-if="widget.deletable">
<a type="delete">Delete</a>
</li>
<li class="divider"></li>
<li class="dropdown-header">
Record's Color
</li>
<li>
<ul class="oe_kanban_colorpicker"
data-field="color"/>
</li>
</ul>
</div>
</div>
<div class="o_kanban_record_body">
<div class="row">
<div class="col-xs-12">
<strong>Team:</strong>
<a name="action_get_team"
type="object">
<field name="team_id"/>
</a>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<strong>Issue Type:</strong>
<a name="action_get_issue_type"
type="object">
<field name="issue_type_id"/>
</a>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<strong>Tags:</strong>
<field name="tag_ids"/>
</div>
</div>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left">
<field name="priority"
widget="priority"/>
</div>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.assigned_to_id.raw_value)"
t-att-title="record.assigned_to_id.value"
width="24" height="24"
class="oe_kanban_avatar"/>
</div>
</div>
</div>
<div class="oe_clear"></div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record model="ir.actions.act_window" id="act_helpdesk_view">
<field name="name">Helpdesk</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">helpdesk.ticket</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form,pivot</field>
<field name="search_view_id" ref="view_helpdesk_search"/>
</record>
<menuitem name="Helpdesk" id="menu_main_helpdesk" web_icon="helpdesk_basic,static/description/icon.png"/>
<menuitem name="Helpdesk" id="menu_helpdesk" parent="menu_main_helpdesk"
sequence="2"/>
<menuitem name="Helpdesk" id="sub_menu_helpdesk"
parent="menu_helpdesk" action="act_helpdesk_view"
sequence="1"/>
<menuitem id="menu_helpdesk_config" name="Configuration"
parent="helpdesk_basic.menu_main_helpdesk" sequence="100"
groups="helpdesk_basic.helpdesk_group_manager,base.group_system"/>
</flectra>