add details

This commit is contained in:
mohammed-alkhazrji 2025-07-20 21:25:55 +03:00
parent 6b087064de
commit 318e112154
5 changed files with 31 additions and 10 deletions

View File

@ -88,15 +88,18 @@
<record id="ticket_request_view_form" model="ir.ui.view">
<field name="name">odex25_helpdesk.ticket.request.form</field>
<field name="model">odex25_helpdesk.ticket</field>
<field name="groups_id"
eval="[(4, ref('helpdesk_employee_request.group_helpdesk_employee'))]"/>
<field name="groups_id" eval="[
(4, ref('helpdesk_employee_request.group_helpdesk_employee')),
(4, ref('helpdesk_employee_request.group_odex25_helpdesk_direct_manager'))
]"/>
<field name="arch" type="xml">
<form string="Helpdesk Ticket">
<header>
<field name="show_button_next" invisible="1"/>
<field name="show_button_previous" invisible="1"/>
<field name="show_button_rejection" invisible="1"/>
<field name="is_read_only_ticket" invisible="1"/>
<field name="show_button_draft" invisible="1"/>
<field name="stage_id" widget="statusbar" options="{'fold_field': 'fold'}" readonly="1"/>
@ -113,7 +116,7 @@
attrs="{'invisible': [('show_button_draft', '=', False)]}"/>
</header>
<sheet>
<sheet attrs="{'readonly':[('is_read_only_ticket','=',True)]}">
<div class="oe_title">
<h1>
<field name="name" class="field_name" placeholder="Subject..." attrs="{'readonly':[('is_submitted','=',True)]}"/>
@ -132,6 +135,7 @@
</group>
<group>
<field name="partner_id" string="Customer"
attrs="{'readonly':[('is_read_only_ticket','=',True)]}"
options='{"no_open": True, "no_create": True}'/>
<field name="partner_email" readonly="1"/>
<field name="department_id" readonly="1" options='{"no_open": True, "no_create": True}'/>
@ -221,12 +225,16 @@
<record id="action_helpdesk_ticket_direct_manager" model="ir.actions.act_window">
<field name="name">Employee Requests (My Staff)</field>
<field name="res_model">odex25_helpdesk.ticket</field>
<field name="view_mode">tree,form</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree'}),
(0, 0, {'view_mode': 'form', 'view_id': ref('helpdesk_employee_request.ticket_request_view_form')})]"/>
<field name="domain">[('ticket_service_type','=','request')]</field>
<field name="context" eval="{
'default_ticket_service_type': 'request',
'active_test':False
}"/>
<field name="context" eval="{
'employee_request': True,
'default_active': False,
'default_ticket_service_type': 'request',
}"/>
</record>

View File

@ -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

View File

@ -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')

View File

@ -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:

View File

@ -127,6 +127,7 @@
</group>
<group string="Stage" >
<field name="final_rejection_stage"/>
<field name="is_read_only"/>
<field name="next_stage" attrs="{'invisible': [('final_rejection_stage', '=', True)]}"/>
<field name="previous_stage" attrs="{'invisible': [('final_rejection_stage', '=', True)]}"/>
@ -580,6 +581,7 @@
<field name="is_self_assigned" invisible="1"/>
<field name="show_button_previous" invisible="1"/>
<field name="show_button_rejection" invisible="1"/>
<field name="is_read_only_ticket" invisible="1"/>
<field name="stage_id" widget="statusbar" options="{'fold_field': 'fold'}" readonly="1"/>
<button name="assign_ticket_to_self" string="Assign To Me" type="object" class="oe_highlight"