-
-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] helpdesk_mgmt_timesheet: Ticket submit broken
If `helpdesk_mgmt_project` is installed without `helpdesk_mgmt_timesheet`, an `AttributeError` is raised when submitting a new ticket
- Loading branch information
1 parent
748d985
commit c683d2e
Showing
8 changed files
with
46 additions
and
25 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
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,2 +1 @@ | ||
from . import models | ||
from . import controllers |
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
File renamed without changes.
File renamed without changes.
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,19 @@ | ||
# Copyright 2023 DEC (https://www.decgroupe.com) | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from odoo.addons.helpdesk_mgmt.tests import test_helpdesk_portal | ||
|
||
|
||
class TestHelpdeskPortal(test_helpdesk_portal.TestHelpdeskPortalBase): | ||
""" """ | ||
|
||
def setUp(self): | ||
super().setUp() | ||
self.env.company.helpdesk_mgmt_portal_select_team = True | ||
|
||
def test_submit_ticket_team(self): | ||
team_id = self.env.ref("helpdesk_mgmt.helpdesk_team_2") | ||
self.authenticate("portal", "portal") | ||
self._submit_ticket(team=team_id.id) | ||
tickets = self.get_new_tickets(self.user_portal) | ||
self.assertIn(self.portal_ticket, tickets) | ||
self.assertIn(team_id, tickets.mapped("team_id")) |