Skip to content

Commit

Permalink
[17.0][MIG] helpdesk_mgmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ilo committed Oct 24, 2024
1 parent cea4e7e commit 6ee5114
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 66 deletions.
2 changes: 1 addition & 1 deletion helpdesk_mgmt/data/helpdesk_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
<record id="mail_alias_lead_info_helpdesk" model="mail.alias">
<field name="alias_name">help</field>
<field name="alias_model_id" ref="model_helpdesk_ticket" />
<field name="alias_user_id" ref="base.user_admin" />
<!-- <field name="alias_user_id" ref="base.user_admin" />-->
<field name="alias_parent_model_id" ref="model_helpdesk_ticket_team" />
</record>
<!-- Helpdesk Ticket-related subtypes for messaging / Chatter -->
Expand Down
4 changes: 2 additions & 2 deletions helpdesk_mgmt/models/helpdesk_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _compute_stage_id(self):
def _compute_user_id(self):
for ticket in self:
if not ticket.user_id and ticket.team_id:
ticket.user_id = ticket.team_id.alias_user_id
ticket.user_id = ticket.team_id.user_id

@api.model
def _read_group_stage_ids(self, stages, domain, order):
Expand Down Expand Up @@ -217,7 +217,7 @@ def _track_template(self, tracking):
{
# Need to set mass_mail so that the email will always be sent
"composition_mode": "mass_mail",
"auto_delete_message": True,
"auto_delete": True,
"subtype_id": self.env["ir.model.data"]._xmlid_to_res_id(
"mail.mt_note"
),
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt/views/helpdesk_ticket_category_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>

<div class="oe_title">
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt/views/helpdesk_ticket_channel_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<div class="oe_title">
<label for="name" class="oe_edit_only" />
Expand Down
7 changes: 2 additions & 5 deletions helpdesk_mgmt/views/helpdesk_ticket_stage_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<div class="oe_button_box" name="button_box">
</div>
Expand All @@ -61,10 +61,7 @@
<group name="main_right">
<field name="active" invisible="1" />
<field name="closed" />
<field
name="close_from_portal"
attrs="{'invisible': [('closed', '=', False)]}"
/>
<field name="close_from_portal" invisible="not closed" />
<field name="unattended" />
</group>
</group>
Expand Down
4 changes: 2 additions & 2 deletions helpdesk_mgmt/views/helpdesk_ticket_tag_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<div class="oe_title">
<label for="name" class="oe_edit_only" />
Expand All @@ -52,7 +52,7 @@
<tree decoration-muted="not active" editable="bottom">
<field name="name" />
<field name="color" widget="color_picker" />
<field name="active" invisible="1" />
<field name="active" column_invisible="True" />
</tree>
</field>
</record>
Expand Down
6 changes: 3 additions & 3 deletions helpdesk_mgmt/views/helpdesk_ticket_team_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Helpdesk Team" />
Expand Down Expand Up @@ -78,7 +78,7 @@
name="%(base_setup.action_general_configuration)d"
string="Configure domain name"
class="btn-link"
attrs="{'invisible': [('alias_domain', '!=', False)]}"
invisible="alias_domain"
/>
</div>
</div>
Expand All @@ -87,7 +87,7 @@
class="oe_inline"
string="Accept Emails From"
/>
<field name="alias_user_id" string="Assign to" />
<!-- <field name="alias_user_id" string="Assign to" />-->
<field
name="company_id"
options="{'no_create': True}"
Expand Down
8 changes: 4 additions & 4 deletions helpdesk_mgmt/views/helpdesk_ticket_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
string="Assign to me"
name="assign_to_me"
type="object"
attrs="{'invisible' : [('user_id', '!=', False)]}"
invisible="user_id"
/>
<field
name="stage_id"
Expand All @@ -154,7 +154,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<div class="oe_button_box" name="button_box">
</div>
Expand Down Expand Up @@ -231,8 +231,8 @@
<field name="partner_id" optional="hide" widget="many2one_avatar" />
<field name="partner_name" optional="show" />
<field name="user_id" optional="show" widget="many2one_avatar_user" />
<field name="unattended" invisible="1" />
<field name="closed" invisible="1" />
<field name="unattended" column_invisible="True" />
<field name="closed" column_invisible="True" />
<field
name="tag_ids"
widget="many2many_tags"
Expand Down
78 changes: 32 additions & 46 deletions helpdesk_mgmt/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,42 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div
class="app_settings_block"
<xpath expr="//form" position="inside">
<app
data-string="Helpdesk"
string="Helpdesk"
data-key="helpdesk_mgmt"
name="helpdesk_mgmt"
groups="helpdesk_mgmt.group_helpdesk_manager"
>
<h2>New ticket form (portal)</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="helpdesk_mgmt_portal_select_team" />
</div>
<div class="o_setting_right_pane">
<label for="helpdesk_mgmt_portal_select_team" />
<div class="text-muted">Show teams form</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field
name="helpdesk_mgmt_portal_team_id_required"
attrs="{'readonly' : [('helpdesk_mgmt_portal_select_team', '=', False)]}"
/>
</div>
<div class="o_setting_right_pane">
<label
for="helpdesk_mgmt_portal_team_id_required"
string="Required Team"
/>
</div>
</div>
</div>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field
name="helpdesk_mgmt_portal_category_id_required"
/>
</div>
<div class="o_setting_right_pane">
<label
for="helpdesk_mgmt_portal_category_id_required"
string="Required Category"
/>
</div>
</div>
</div>
</div>
<block
title="New ticket form (portal)"
name="helpdesk_mgmt_portal_settings"
>

<setting>
<field name="helpdesk_mgmt_portal_select_team" />
<label for="helpdesk_mgmt_portal_select_team" />
<div class="text-muted">Show teams form</div>
</setting>
<setting>
<field
name="helpdesk_mgmt_portal_team_id_required"
readonly="not helpdesk_mgmt_portal_select_team"
/>
<label
for="helpdesk_mgmt_portal_team_id_required"
string="Required Team"
/>
</setting>
<setting>
<field name="helpdesk_mgmt_portal_category_id_required" />
<label
for="helpdesk_mgmt_portal_category_id_required"
string="Required Category"
/>
</setting>
</block>
</app>
</xpath>
</field>
</record>
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt/views/res_partner_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<field name="arch" type="xml">
<div class="oe_button_box" name="button_box">
<button
context="{'search_default_open': True, 'default_partner_id': active_id}"
context="{'search_default_open': True, 'default_partner_id': id}"
name="action_view_helpdesk_tickets"
type="object"
class="oe_stat_button"
Expand Down

0 comments on commit 6ee5114

Please sign in to comment.