From 8eaafbc8774b9d6534cea0662b40464fb7cb5825 Mon Sep 17 00:00:00 2001 From: Andhitia Rama Date: Thu, 21 Sep 2023 06:20:52 +0700 Subject: [PATCH] [UPD] ssi_helpdesk * Remove data requirement fields on helpdesk ticket. Data requirement stuff will be implemented using data requirement mixin * Combine split dan duplicate page on helpdesk view --- ssi_helpdesk/models/helpdesk_ticket.py | 33 ----------------- ssi_helpdesk/views/helpdesk_ticket_views.xml | 39 +------------------- 2 files changed, 1 insertion(+), 71 deletions(-) diff --git a/ssi_helpdesk/models/helpdesk_ticket.py b/ssi_helpdesk/models/helpdesk_ticket.py index af800da..c93a7dd 100644 --- a/ssi_helpdesk/models/helpdesk_ticket.py +++ b/ssi_helpdesk/models/helpdesk_ticket.py @@ -205,21 +205,6 @@ def _default_date(self): inverse_name="split_id", copy=False, ) - data_requirement_ids = fields.One2many( - string="Data Requirements", - comodel_name="helpdesk_ticket.data_requirement", - inverse_name="ticket_id", - ) - data_requirement_state = fields.Selection( - string="Data Requirement Status", - selection=[ - ("no_need", "Not Needed"), - ("open", "In Progress"), - ("done", "Done"), - ], - compute="_compute_data_requirement_state", - store=True, - ) resolution_documentation_ids = fields.One2many( string="Resolution Documentations", comodel_name="helpdesk_ticket.resolution_documentation", @@ -278,24 +263,6 @@ def _get_policy_field(self): res += policy_field return res - @api.depends( - "data_requirement_ids", - "data_requirement_ids.state", - ) - def _compute_data_requirement_state(self): - for record in self: - result = "no_need" - - count_req = len(record.data_requirement_ids) - - if count_req > 0: - result = "done" - for req in record.data_requirement_ids: - if req.state == "open": - result = "open" - - record.data_requirement_state = result - @api.depends( "resolution_documentation_ids", "resolution_documentation_ids.state", diff --git a/ssi_helpdesk/views/helpdesk_ticket_views.xml b/ssi_helpdesk/views/helpdesk_ticket_views.xml index 4e9fb29..901f0e3 100644 --- a/ssi_helpdesk/views/helpdesk_ticket_views.xml +++ b/ssi_helpdesk/views/helpdesk_ticket_views.xml @@ -20,22 +20,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -189,13 +154,11 @@ - + - -