Skip to content

Commit

Permalink
[FIX] helpdesk_mgmt_timesheet: adapt for merged project_timesheet_tim…
Browse files Browse the repository at this point in the history
…e_control

Also set the version to 15.0.1.0.0 as indicated in OCA’s migration
guide.
  • Loading branch information
vincent-hatakeyama committed Apr 26, 2023
1 parent 9c86c3f commit 84dead0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion helpdesk_mgmt_timesheet/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"website": "https://github.com/OCA/helpdesk",
"license": "AGPL-3",
"category": "After-Sales",
"version": "15.0.1.0.1",
"version": "15.0.1.0.0",
"depends": [
"helpdesk_mgmt_project",
"hr_timesheet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from datetime import datetime, timedelta

from odoo import exceptions, fields
from odoo import exceptions
from odoo.tests import common


Expand Down Expand Up @@ -92,15 +92,14 @@ def test_ticket_time_control_flow(self):
self.assertEqual(self.ticket.show_time_control, "start")
start_action = self.ticket.button_start_work()
wizard = self._create_wizard(start_action, self.ticket_line)
self.assertFalse(wizard.amount)
self.assertLessEqual(wizard.date_time, datetime.now())
self.assertLessEqual(wizard.date, fields.Date.context_today(wizard))
self.assertFalse(wizard.unit_amount)
self.assertEqual(wizard.account_id, self.ticket.project_id.analytic_account_id)
self.assertEqual(wizard.employee_id, self.env.user.employee_ids)
self.assertEqual(
wizard.analytic_line_id.account_id,
self.ticket.project_id.analytic_account_id,
)
self.assertEqual(wizard.name, self.ticket_line.name)
self.assertEqual(wizard.project_id, self.ticket.project_id)
self.assertEqual(wizard.ticket_id, self.ticket)
self.assertFalse(wizard.task_id)
new_act = wizard.with_context(show_created_timer=True).action_switch()
new_line = self.env[new_act["res_model"]].browse(new_act["res_id"])
self.assertEqual(new_line.employee_id, self.env.user.employee_ids)
Expand Down

0 comments on commit 84dead0

Please sign in to comment.