-
-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG]helpdesk_motive: Migration to 16.0
- Loading branch information
1 parent
70df601
commit cdc6234
Showing
11 changed files
with
132 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,13 @@ | |
Helpdesk Motive | ||
=============== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:d39e3a4544fc9651c357088907a9813140eab6c54457d917165081bbbacd7605 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
|
@@ -14,16 +17,16 @@ Helpdesk Motive | |
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github | ||
:target: https://github.com/OCA/helpdesk/tree/14.0/helpdesk_motive | ||
:target: https://github.com/OCA/helpdesk/tree/16.0/helpdesk_motive | ||
:alt: OCA/helpdesk | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/helpdesk-14-0/helpdesk-14-0-helpdesk_motive | ||
:target: https://translation.odoo-community.org/projects/helpdesk-16-0/helpdesk-16-0-helpdesk_motive | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/282/14.0 | ||
:alt: Try me on Runbot | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module adds a motive field on the helpdesk ticket. | ||
The list is filtered based on the helpdesk team. | ||
|
@@ -50,8 +53,8 @@ Bug Tracker | |
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/helpdesk/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_motive%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_motive%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
|
@@ -61,6 +64,7 @@ Credits | |
Authors | ||
~~~~~~~ | ||
|
||
* Binhex | ||
* Konos | ||
* Open Source Integrators | ||
|
||
|
@@ -79,6 +83,10 @@ Contributors | |
|
||
* David Alonso <[email protected]> | ||
|
||
* `Binhex <https://binhex.cloud>_`: | ||
|
||
* Adasat Torres <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
|
@@ -103,6 +111,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: | |
|
||
|maintainer-nelsonramirezs| |maintainer-max3903| | ||
|
||
This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/14.0/helpdesk_motive>`_ project on GitHub. | ||
This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/16.0/helpdesk_motive>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<?xml version="1.0" ?> | ||
<odoo> | ||
<data noupdate="1"> | ||
<record id="helpdesk_motive_1" model="helpdesk.ticket.motive"> | ||
<field name="name">Client requirement</field> | ||
<field name="team_id" ref="helpdesk_mgmt.helpdesk_team_1" /> | ||
</record> | ||
<record id="helpdesk_motive_2" model="helpdesk.ticket.motive"> | ||
<field name="name">Update required</field> | ||
<field name="team_id" ref="helpdesk_mgmt.helpdesk_team_1" /> | ||
</record> | ||
<odoo noupdate="1"> | ||
|
||
<record id="helpdesk_motive_1" model="helpdesk.ticket.motive"> | ||
<field name="name">Client requirement</field> | ||
<field name="team_id" ref="helpdesk_mgmt.helpdesk_team_1" /> | ||
</record> | ||
<record id="helpdesk_motive_2" model="helpdesk.ticket.motive"> | ||
<field name="name">Update required</field> | ||
<field name="team_id" ref="helpdesk_mgmt.helpdesk_team_1" /> | ||
</record> | ||
|
||
<record id="helpdesk_mgmt.helpdesk_ticket_7" model="helpdesk.ticket"> | ||
<field name="motive_id" ref="helpdesk_motive_1" /> | ||
</record> | ||
|
||
<record id="helpdesk_mgmt.helpdesk_ticket_7" model="helpdesk.ticket"> | ||
<field name="motive_id" ref="helpdesk_motive_1" /> | ||
</record> | ||
</data> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,7 @@ | |
* `Solvos <https://www.solvos.es>`_: | ||
|
||
* David Alonso <[email protected]> | ||
|
||
* `Binhex <https://binhex.cloud>_`: | ||
|
||
* Adasat Torres <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import test_helpdesk_motive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Copyright (C) 2023 Binhex - Adasat Torres | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from odoo.tests import new_test_user | ||
from odoo.tests.common import TransactionCase | ||
|
||
|
||
class TestHelpdeskMotive(TransactionCase): | ||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
# Initialize the class object | ||
helpdesk_ticket_team = cls.env["helpdesk.ticket.team"] | ||
ctx = { | ||
"mail_create_nolog": True, | ||
"mail_create_nosubscribe": True, | ||
"mail_notrack": True, | ||
"no_reset_password": True, | ||
} | ||
cls.user_team = new_test_user( | ||
cls.env, | ||
login="helpdesk_mgmt-user_team", | ||
groups="helpdesk_mgmt.group_helpdesk_user_team", | ||
context=ctx, | ||
) | ||
cls.user = new_test_user( | ||
cls.env, | ||
login="helpdesk_mgmt-user", | ||
groups="helpdesk_mgmt.group_helpdesk_user", | ||
context=ctx, | ||
) | ||
cls.team_a = helpdesk_ticket_team.create( | ||
{"name": "Team A", "user_ids": [(6, 0, [cls.user.id])]} | ||
) | ||
cls.team_b = helpdesk_ticket_team.create( | ||
{"name": "Team B", "user_ids": [(6, 0, [cls.user_team.id])]} | ||
) | ||
|
||
cls.motive_id = cls.env["helpdesk.ticket.motive"].create( | ||
{"name": "motive_test", "team_id": cls.team_a.id} | ||
) | ||
|
||
cls.ticket_a_user_team = cls._create_ticket( | ||
cls, cls.team_a, cls.motive_id, cls.user_team | ||
) | ||
|
||
def _create_ticket(self, team, motive, user=False): | ||
return self.env["helpdesk.ticket"].create( | ||
{ | ||
"name": "Ticket %s (%s)" | ||
% (team.name, user.login if user else "unassigned"), | ||
"description": "Description", | ||
"team_id": team.id, | ||
"user_id": user.id if user else False, | ||
"priority": "1", | ||
"motive_id": motive.id, | ||
} | ||
) | ||
|
||
def test_compute_team_user_helpdesk_motive(self): | ||
self.assertTrue(self.ticket_a_user_team.motive_id) | ||
self.ticket_a_user_team.write({"team_id": self.team_b.id}) | ||
self.assertFalse(self.ticket_a_user_team.motive_id) | ||
self.ticket_a_user_team.write({"motive_id": self.motive_id.id}) | ||
self.assertTrue(self.ticket_a_user_team.motive_id) | ||
self.ticket_a_user_team.write({"user_id": self.user.id}) | ||
self.assertFalse(self.ticket_a_user_team.motive_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters