Skip to content

Commit

Permalink
Merge branch 'OCA:16.0' into 16.0-t3829-helpdesk_mgmt_templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Bearnard21 authored Sep 18, 2024
2 parents 2345645 + 34dacfd commit 1bae46d
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[helpdesk_mgmt](helpdesk_mgmt/) | 16.0.2.6.1 | | Helpdesk
[helpdesk_mgmt_project](helpdesk_mgmt_project/) | 16.0.2.2.0 | | Add the option to select project in the tickets.
[helpdesk_mgmt](helpdesk_mgmt/) | 16.0.2.6.2 | | Helpdesk
[helpdesk_mgmt_project](helpdesk_mgmt_project/) | 16.0.2.3.0 | | Add the option to select project in the tickets.
[helpdesk_mgmt_rating](helpdesk_mgmt_rating/) | 16.0.1.0.0 | | This module allows customer to rate the assistance received on a ticket.
[helpdesk_mgmt_timesheet](helpdesk_mgmt_timesheet/) | 16.0.1.5.1 | | Add HR Timesheet to the tickets for Helpdesk Management.
[helpdesk_motive](helpdesk_motive/) | 16.0.1.0.0 | [![nelsonramirezs](https://github.com/nelsonramirezs.png?size=30px)](https://github.com/nelsonramirezs) [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) | Keep the motive
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Helpdesk Management
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4d44f400caf38a0678ff76f28b1da6b9e8454ac4905fd69f1824d13ae26448e5
!! source digest: sha256:a5c1fe41ebe60837c24f33363511111603fcee2f9387b84bd2fe69aaaafb5938
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Helpdesk Management",
"summary": """
Helpdesk""",
"version": "16.0.2.6.1",
"version": "16.0.2.6.2",
"license": "AGPL-3",
"category": "After-Sales",
"author": "AdaptiveCity, "
Expand Down
4 changes: 2 additions & 2 deletions helpdesk_mgmt/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-07-29 13:58+0000\n"
"PO-Revision-Date: 2024-08-30 10:06+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
Expand Down Expand Up @@ -810,7 +810,7 @@ msgstr "Carica file"
#. module: helpdesk_mgmt
#: model:ir.model.fields,field_description:helpdesk_mgmt.field_helpdesk_ticket_stage__fold
msgid "Folded in Kanban"
msgstr "Minimizzato in Kanban"
msgstr "Minimizzato nel Kanban"

#. module: helpdesk_mgmt
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt.view_helpdesk_team_form
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Helpdesk Management</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4d44f400caf38a0678ff76f28b1da6b9e8454ac4905fd69f1824d13ae26448e5
!! source digest: sha256:a5c1fe41ebe60837c24f33363511111603fcee2f9387b84bd2fe69aaaafb5938
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/helpdesk/tree/16.0/helpdesk_mgmt"><img alt="OCA/helpdesk" src="https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/helpdesk-16-0/helpdesk-16-0-helpdesk_mgmt"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds Helpdesk functionality in Odoo.</p>
Expand Down
1 change: 1 addition & 0 deletions helpdesk_mgmt/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def setUpClass(cls):
"mail_notrack": True,
"no_reset_password": True,
}
cls.company = cls.env.company
cls.user_own = new_test_user(
cls.env,
login="helpdesk_mgmt-user_own",
Expand Down
50 changes: 50 additions & 0 deletions helpdesk_mgmt/tests/test_helpdesk_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,56 @@ def setUpClass(cls):
super().setUpClass()
cls.ticket = cls.ticket_a_unassigned

def test_helpdesk_ticket_team_company(self):
ticket_a = self.env["helpdesk.ticket"].create(
{
"name": "Test ticket A",
"team_id": self.team_a.id,
"description": "description",
}
)
self.assertEqual(ticket_a.company_id, self.company)
self.team_b.company_id = False
ticket_b = self.env["helpdesk.ticket"].create(
{
"name": "Test ticket b",
"team_id": self.team_b.id,
"description": "description",
}
)
self.assertEqual(ticket_b.company_id, self.company)

def test_helpdesk_ticket_team_company_extra(self):
company = self.env["res.company"].create({"name": "Test company"})
team = self.env["helpdesk.ticket.team"].create(
{"name": "Test team", "company_id": False}
)
ticket = (
self.env["helpdesk.ticket"]
.with_company(company)
.create(
{
"name": "Test ticket",
"team_id": team.id,
"description": "description",
}
)
)
self.assertEqual(ticket.company_id, company)
team.company_id = self.company
ticket = (
self.env["helpdesk.ticket"]
.with_company(company)
.create(
{
"name": "Test ticket",
"team_id": team.id,
"description": "description",
}
)
)
self.assertEqual(ticket.company_id, self.company)

def test_helpdesk_ticket_datetimes(self):
old_stage_update = self.ticket.last_stage_update
self.assertTrue(
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt_project/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Helpdesk Project
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:21628fa7e819622ea00a2b99fe17139360c9bdf8236fabd5d3ba8005f79523ae
!! source digest: sha256:b75359f1fdad1a7f94c05edd34d09a48c3a4d0c692ba91d97e48b62f47f3ae03
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt_project/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Helpdesk Project",
"summary": "Add the option to select project in the tickets.",
"version": "16.0.2.2.0",
"version": "16.0.2.3.0",
"license": "AGPL-3",
"category": "After-Sales",
"author": "PuntSistemes S.L.U., " "Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt_project/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Helpdesk Project</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:21628fa7e819622ea00a2b99fe17139360c9bdf8236fabd5d3ba8005f79523ae
!! source digest: sha256:b75359f1fdad1a7f94c05edd34d09a48c3a4d0c692ba91d97e48b62f47f3ae03
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/helpdesk/tree/16.0/helpdesk_mgmt_project"><img alt="OCA/helpdesk" src="https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/helpdesk-16-0/helpdesk-16-0-helpdesk_mgmt_project"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds Project in Helpdesk.
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt_project/views/helpdesk_ticket_team_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<field name="inherit_id" ref="helpdesk_mgmt.view_helpdesk_team_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='alias_user_id']" position="after">
<field name="default_project_id" />
<field name="default_project_id" groups="project.group_project_user" />
</xpath>
</field>
</record>
Expand Down
11 changes: 7 additions & 4 deletions helpdesk_mgmt_project/views/helpdesk_ticket_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<field name="inherit_id" ref="helpdesk_mgmt.ticket_view_tree" />
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="project_id" />
<field name="project_id" groups="project.group_project_user" />
</field>
</field>
</record>
Expand All @@ -22,8 +22,8 @@
<field name="inherit_id" ref="helpdesk_mgmt.helpdesk_ticket_view_search" />
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="project_id" />
<field name="task_id" />
<field name="project_id" groups="project.group_project_user" />
<field name="task_id" groups="project.group_project_user" />
</field>
</field>
</record>
Expand All @@ -33,12 +33,15 @@
<field name="inherit_id" ref="helpdesk_mgmt.ticket_view_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_email']" position="after">
<field name="project_id" />
<field name="project_id" invisible="1" />
<field name="project_id" groups="project.group_project_user" />
<field name="task_id" invisible="1" />
<field
name="task_id"
domain="[('project_id', '=', project_id)]"
attrs="{'invisible':[('project_id', '=', False)]}"
context="{'default_project_id': project_id}"
groups="project.group_project_user"
/>
</xpath>
</field>
Expand Down
7 changes: 6 additions & 1 deletion helpdesk_mgmt_project/views/project_task_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
icon="fa-file"
name="%(ticket_action_from_project)d"
context="{'search_default_task_id': id, 'default_task_id': id, 'search_default_project_id': project_id, 'default_project_id': project_id}"
groups="helpdesk_mgmt.group_helpdesk_user_own"
>
<field string="Tickets" name="ticket_count" widget="statinfo" />
</button>
Expand All @@ -26,6 +27,7 @@
string="Open Tickets"
name="open_tickets"
domain="[('todo_ticket_count', '&gt;', 0)]"
groups="helpdesk_mgmt.group_helpdesk_user_own"
/>
</xpath>
</field>
Expand All @@ -35,7 +37,10 @@
<field name="inherit_id" ref="project.view_task_kanban" />
<field name="arch" type="xml">
<div class="oe_kanban_bottom_right" position="before">
<div attrs="{'invisible':[('ticket_count', '=', 0)]}">
<div
attrs="{'invisible':[('ticket_count', '=', 0)]}"
groups="helpdesk_mgmt.group_helpdesk_user_own"
>
<a
class="o_project_kanban_box"
name="action_view_ticket"
Expand Down
13 changes: 11 additions & 2 deletions helpdesk_mgmt_project/views/project_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
icon="fa-file"
name="%(ticket_action_from_project)d"
context="{'search_default_project_id': active_id, 'default_project_id': active_id}"
groups="helpdesk_mgmt.group_helpdesk_user_own"
>
<field string="Tickets" name="ticket_count" widget="statinfo" />
</button>
Expand All @@ -22,15 +23,22 @@
<field name="inherit_id" ref="project.view_project_kanban" />
<field name="arch" type="xml">
<xpath expr="//field[@name='task_count']" position="after">
<field name="ticket_count" />
<field name="label_tickets" />
<field
name="ticket_count"
groups="helpdesk_mgmt.group_helpdesk_user_own"
/>
<field
name="label_tickets"
groups="helpdesk_mgmt.group_helpdesk_user_own"
/>
</xpath>
<xpath expr="//a[hasclass('o_project_kanban_box')]" position="after">
<a
class="o_project_kanban_box"
name="%(ticket_action_from_project)d"
type="action"
context="{'search_default_project_id': active_id, 'default_project_id': active_id}"
groups="helpdesk_mgmt.group_helpdesk_user_own"
>
<div>
<span class="o_value">
Expand All @@ -53,6 +61,7 @@
string="Open Tickets"
name="open_tickets"
domain="[('todo_ticket_count', '&gt;', 0)]"
groups="helpdesk_mgmt.group_helpdesk_user_own"
/>
</xpath>
</field>
Expand Down

0 comments on commit 1bae46d

Please sign in to comment.