From 318e1121546f1b6eafe5eaac99f481e357f6deb6 Mon Sep 17 00:00:00 2001 From: mohammed-alkhazrji Date: Sun, 20 Jul 2025 21:25:55 +0300 Subject: [PATCH] add details --- .../views/help_request_view.xml | 26 ++++++++++++------- odex25_helpdesk/odex25_helpdesk/i18n/ar.po | 7 +++++ .../odex25_helpdesk/models/odex25_helpdesk.py | 3 +++ .../models/odex25_helpdesk_ticket.py | 3 ++- .../views/odex25_helpdesk_views.xml | 2 ++ 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/odex25_helpdesk/helpdesk_employee_request/views/help_request_view.xml b/odex25_helpdesk/helpdesk_employee_request/views/help_request_view.xml index 6fb0a4ce7..adb2edcb6 100644 --- a/odex25_helpdesk/helpdesk_employee_request/views/help_request_view.xml +++ b/odex25_helpdesk/helpdesk_employee_request/views/help_request_view.xml @@ -88,15 +88,18 @@ odex25_helpdesk.ticket.request.form odex25_helpdesk.ticket - + +
- + @@ -113,7 +116,7 @@ attrs="{'invisible': [('show_button_draft', '=', False)]}"/>
- +

@@ -132,6 +135,7 @@ @@ -221,12 +225,16 @@ Employee Requests (My Staff) odex25_helpdesk.ticket - tree,form + [('ticket_service_type','=','request')] - + + diff --git a/odex25_helpdesk/odex25_helpdesk/i18n/ar.po b/odex25_helpdesk/odex25_helpdesk/i18n/ar.po index 57be87f00..b1f64877e 100644 --- a/odex25_helpdesk/odex25_helpdesk/i18n/ar.po +++ b/odex25_helpdesk/odex25_helpdesk/i18n/ar.po @@ -3559,6 +3559,13 @@ msgstr "فقط أعضاء مجموعة '%s' يمكنهم اعتماد هذه ا msgid "Only the employee's manager can proceed with this stage." msgstr "فقط مدير الموظف يمكنه اعتماد هذه المرحلة." + +#. module: odex25_helpdesk +#: code:addons/odex25_helpdesk/models/odex25_helpdesk_ticket.py:0 +msgid "You cannot proceed because you are not the employee linked to this ticket." +msgstr "لا يمكنك المتابعة لأنك لست الموظف المرتبط بهذه التذكرة." + + #. module: odex25_helpdesk #: code:addons/odex25_helpdesk/models/odex25_helpdesk_ticket.py:0 #, python-format diff --git a/odex25_helpdesk/odex25_helpdesk/models/odex25_helpdesk.py b/odex25_helpdesk/odex25_helpdesk/models/odex25_helpdesk.py index b5549fa94..ae297190b 100644 --- a/odex25_helpdesk/odex25_helpdesk/models/odex25_helpdesk.py +++ b/odex25_helpdesk/odex25_helpdesk/models/odex25_helpdesk.py @@ -484,6 +484,9 @@ class odex25_helpdeskStage(models.Model): string="Final Rejection Stage", help="Mark this stage as the final rejection stage." ) + is_read_only = fields.Boolean(string='Readonly Field',default=False,) + + def unlink(self): stages = self default_team_id = self.env.context.get('default_team_id') diff --git a/odex25_helpdesk/odex25_helpdesk/models/odex25_helpdesk_ticket.py b/odex25_helpdesk/odex25_helpdesk/models/odex25_helpdesk_ticket.py index e195d4ac7..22dc6038b 100644 --- a/odex25_helpdesk/odex25_helpdesk/models/odex25_helpdesk_ticket.py +++ b/odex25_helpdesk/odex25_helpdesk/models/odex25_helpdesk_ticket.py @@ -324,7 +324,7 @@ class odex25_helpdeskTicket(models.Model): show_button_rejection = fields.Boolean(related='stage_id.final_rejection', store=True) manager_id = fields.Many2one('res.users', string='Employee', readonly=True) show_button_draft = fields.Boolean(related='stage_id.final_rejection_stage', store=True) - + is_read_only_ticket = fields.Boolean(related='stage_id.is_read_only', store=True) @api.onchange('partner_id') def _onchange_partner_id_set_employee(self): @@ -1074,6 +1074,7 @@ class odex25_helpdeskTicket(models.Model): def action_rejection(self): self.ensure_one() + self._validate_stage_transition() rejection_stage = self.team_id.stage_ids.filtered( lambda s: s.final_rejection_stage) if not rejection_stage: diff --git a/odex25_helpdesk/odex25_helpdesk/views/odex25_helpdesk_views.xml b/odex25_helpdesk/odex25_helpdesk/views/odex25_helpdesk_views.xml index f25c24a48..1efbf62e8 100644 --- a/odex25_helpdesk/odex25_helpdesk/views/odex25_helpdesk_views.xml +++ b/odex25_helpdesk/odex25_helpdesk/views/odex25_helpdesk_views.xml @@ -127,6 +127,7 @@ + @@ -580,6 +581,7 @@ +