diff --git a/README.md b/README.md index cd28948f59..b8134df6ad 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- -[helpdesk_mgmt](helpdesk_mgmt/) | 16.0.2.6.1 | | Helpdesk +[helpdesk_mgmt](helpdesk_mgmt/) | 16.0.2.6.2 | | Helpdesk [helpdesk_mgmt_project](helpdesk_mgmt_project/) | 16.0.2.2.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. diff --git a/helpdesk_mgmt/README.rst b/helpdesk_mgmt/README.rst index d7115ace67..dfd330fb07 100644 --- a/helpdesk_mgmt/README.rst +++ b/helpdesk_mgmt/README.rst @@ -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 diff --git a/helpdesk_mgmt/__manifest__.py b/helpdesk_mgmt/__manifest__.py index cd593e760d..156a332f9d 100644 --- a/helpdesk_mgmt/__manifest__.py +++ b/helpdesk_mgmt/__manifest__.py @@ -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, " diff --git a/helpdesk_mgmt/static/description/index.html b/helpdesk_mgmt/static/description/index.html index def9a78195..768a4243b5 100644 --- a/helpdesk_mgmt/static/description/index.html +++ b/helpdesk_mgmt/static/description/index.html @@ -367,7 +367,7 @@
This module adds Helpdesk functionality in Odoo.
diff --git a/helpdesk_mgmt/tests/common.py b/helpdesk_mgmt/tests/common.py index 144e6937f6..a41e5f35f4 100644 --- a/helpdesk_mgmt/tests/common.py +++ b/helpdesk_mgmt/tests/common.py @@ -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", diff --git a/helpdesk_mgmt/tests/test_helpdesk_ticket.py b/helpdesk_mgmt/tests/test_helpdesk_ticket.py index abc4ced815..69aaf9c340 100644 --- a/helpdesk_mgmt/tests/test_helpdesk_ticket.py +++ b/helpdesk_mgmt/tests/test_helpdesk_ticket.py @@ -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(