From afd6b023669e67abafa21679bd72111cf431f446 Mon Sep 17 00:00:00 2001 From: Aromera Date: Tue, 4 Jul 2023 10:45:43 +0200 Subject: [PATCH] [MIG] helpdesk_mgmt_timesheet: Migration 16.0 --- helpdesk_mgmt_timesheet/__manifest__.py | 2 +- .../demo/helpdesk_mgmt_timesheet_demo.xml | 70 +++++++++---------- .../models/helpdesk_ticket.py | 6 +- .../models/helpdesk_ticket_team.py | 4 +- .../report/report_timesheet_templates.xml | 2 + .../tests/test_helpdesk_mgmt_timesheet.py | 45 +++++++++--- .../test_helpdesk_timesheet_time_control.py | 4 +- .../views/helpdesk_ticket_view.xml | 22 ++---- .../views/hr_timesheet_view.xml | 23 +++--- .../wizards/hr_timesheet_switch.py | 26 +++---- .../odoo/addons/helpdesk_mgmt_timesheet | 1 + setup/helpdesk_mgmt_timesheet/setup.py | 6 ++ 12 files changed, 117 insertions(+), 94 deletions(-) create mode 120000 setup/helpdesk_mgmt_timesheet/odoo/addons/helpdesk_mgmt_timesheet create mode 100644 setup/helpdesk_mgmt_timesheet/setup.py diff --git a/helpdesk_mgmt_timesheet/__manifest__.py b/helpdesk_mgmt_timesheet/__manifest__.py index d748ad130b..9136443bca 100644 --- a/helpdesk_mgmt_timesheet/__manifest__.py +++ b/helpdesk_mgmt_timesheet/__manifest__.py @@ -15,7 +15,7 @@ "website": "https://github.com/OCA/helpdesk", "license": "AGPL-3", "category": "After-Sales", - "version": "14.0.1.0.1", + "version": "16.0.1.0.0", "depends": [ "helpdesk_mgmt_project", "hr_timesheet", diff --git a/helpdesk_mgmt_timesheet/demo/helpdesk_mgmt_timesheet_demo.xml b/helpdesk_mgmt_timesheet/demo/helpdesk_mgmt_timesheet_demo.xml index efbadd1b15..a496dffbab 100644 --- a/helpdesk_mgmt_timesheet/demo/helpdesk_mgmt_timesheet_demo.xml +++ b/helpdesk_mgmt_timesheet/demo/helpdesk_mgmt_timesheet_demo.xml @@ -1,38 +1,36 @@ - - - - Helpdesk general project - - - Helpdesk general task - - - - - - - - - - - - - - - Initial analysis - - - - - - - - Resolution - - - - - - + + + Helpdesk general project + + + Helpdesk general task + + + + + + + + + + + + + + + Initial analysis + + + + + + + + Resolution + + + + + diff --git a/helpdesk_mgmt_timesheet/models/helpdesk_ticket.py b/helpdesk_mgmt_timesheet/models/helpdesk_ticket.py index 304682a3ae..d8bc1193ca 100644 --- a/helpdesk_mgmt_timesheet/models/helpdesk_ticket.py +++ b/helpdesk_mgmt_timesheet/models/helpdesk_ticket.py @@ -16,18 +16,16 @@ def _relation_with_timesheet_line(self): string="Allow Timesheet", related="team_id.allow_timesheet", ) - planned_hours = fields.Float(string="Planned Hours", tracking=True) + planned_hours = fields.Float(tracking=True) progress = fields.Float( compute="_compute_progress_hours", group_operator="avg", store=True, - string="Progress", ) remaining_hours = fields.Float( compute="_compute_progress_hours", readonly=True, store=True, - string="Remaining Hours", ) timesheet_ids = fields.One2many( comodel_name="account.analytic.line", @@ -35,7 +33,7 @@ def _relation_with_timesheet_line(self): string="Timesheet", ) total_hours = fields.Float( - compute="_compute_total_hours", readonly=True, store=True, string="Total Hours" + compute="_compute_total_hours", readonly=True, store=True ) last_timesheet_activity = fields.Date( compute="_compute_last_timesheet_activity", diff --git a/helpdesk_mgmt_timesheet/models/helpdesk_ticket_team.py b/helpdesk_mgmt_timesheet/models/helpdesk_ticket_team.py index 95be41eaba..32ac584e17 100644 --- a/helpdesk_mgmt_timesheet/models/helpdesk_ticket_team.py +++ b/helpdesk_mgmt_timesheet/models/helpdesk_ticket_team.py @@ -7,9 +7,7 @@ class HelpdeskTicketTeam(models.Model): _inherit = "helpdesk.ticket.team" - allow_timesheet = fields.Boolean( - string="Allow Timesheet", - ) + allow_timesheet = fields.Boolean() default_project_id = fields.Many2one( comodel_name="project.project", string="Default Project", diff --git a/helpdesk_mgmt_timesheet/report/report_timesheet_templates.xml b/helpdesk_mgmt_timesheet/report/report_timesheet_templates.xml index ae06ad14e6..f0caa6695e 100644 --- a/helpdesk_mgmt_timesheet/report/report_timesheet_templates.xml +++ b/helpdesk_mgmt_timesheet/report/report_timesheet_templates.xml @@ -8,6 +8,8 @@ groups="helpdesk_mgmt.group_helpdesk_user" /> + +