Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Arturo Jasso Origel
/
helpdesk
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
30036129
authored
Jan 30, 2023
by
Arturo Jasso Origel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajustes en vistas
parent
56306cf5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
+30
-4
helpdesk_morsa/models/__pycache__/helpdesk_ticket.cpython-39.pyc
+0
-0
helpdesk_morsa/models/helpdesk_ticket.py
+20
-1
helpdesk_morsa/views/odoo/helpdesk_ticket.xml
+10
-3
No files found.
helpdesk_morsa/models/__pycache__/helpdesk_ticket.cpython-39.pyc
View file @
30036129
No preview for this file type
helpdesk_morsa/models/helpdesk_ticket.py
View file @
30036129
...
...
@@ -32,7 +32,9 @@ class HelpdeskTicket(models.Model):
problem_solved_on_time
=
fields
.
Boolean
(
'¿Solucionamos complementame tu problema?'
)
good_service_actitude
=
fields
.
Boolean
(
'¿Ha sido buena nuestra actitud de Servicio?'
)
begin_before_ten_min
=
fields
.
Boolean
(
'¿COmenzamos a atenderte antes de 10 minutos?'
)
is_support
=
fields
.
Boolean
(
'Es soporte'
,
compute
=
'_compute_ticket_type'
)
is_erp
=
fields
.
Boolean
(
'Es ERP'
,
compute
=
'_compute_ticket_type'
)
is_emergency
=
fields
.
Boolean
(
'Es 911'
,
compute
=
'_compute_ticket_type'
)
def
_get_color
(
self
):
...
...
@@ -48,6 +50,23 @@ class HelpdeskTicket(models.Model):
rec
.
color
=
10
@api.depends
(
'team_id'
)
def
_compute_ticket_type
(
self
):
for
ticket
in
self
:
if
ticket
.
team_id
.
id
==
self
.
env
.
ref
(
'helpdesk_morsa.techinnical_support'
)
.
id
:
ticket
.
is_support
=
True
else
:
ticket
.
is_support
=
False
if
ticket
.
team_id
.
id
==
self
.
env
.
ref
(
'helpdesk_morsa.erp_asistense'
)
.
id
:
ticket
.
is_erp
=
True
else
:
ticket
.
is_erp
=
False
if
ticket
.
team_id
.
id
==
self
.
env
.
ref
(
'helpdesk_morsa.ti_emergency'
)
.
id
:
ticket
.
is_emergency
=
True
else
:
ticket
.
is_emergency
=
False
def
assign_me
(
self
):
self
.
user_id
=
self
.
env
.
user
.
id
...
...
helpdesk_morsa/views/odoo/helpdesk_ticket.xml
View file @
30036129
...
...
@@ -8,9 +8,13 @@
<field
name=
"priority"
eval=
"17"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//field[@name='priority']"
position=
"after"
>
<field
name=
"erp_id"
attrs=
"{'invisible':[('team_id', '!=', 2)]}"
/>
<field
name=
"warehouse_id"
attrs=
"{'invisible':[('team_id', '!=', 2)]}"
/>
<field
name=
"incidence_type"
attrs=
"{'invisible':[('team_id', '!=', 3)]}"
/>
<field
name=
"is_support"
invisible=
"1"
/>
<field
name=
"is_erp"
invisible=
"1"
/>
<field
name=
"is_emergency"
invisible=
"1"
/>
<field
name=
"erp_type"
widget=
"radio"
attrs=
"{'invisible':[('is_erp', '=', False)]}"
options=
"{'horizontal': true}"
/>
<field
name=
"erp_id"
attrs=
"{'invisible':[('is_erp', '=', False)]}"
/>
<field
name=
"warehouse_id"
attrs=
"{'invisible':[('is_erp', '=', False)]}"
/>
<field
name=
"incidence_type"
attrs=
"{'invisible':[('is_emergency', '=', False)]}"
/>
</xpath>
<xpath
expr=
"//header"
position=
"replace"
>
<header>
...
...
@@ -25,6 +29,9 @@
<field
name=
"stage_id"
widget=
"statusbar"
/>
</header>
</xpath>
<xpath
expr=
"//field[@name='tag_ids']"
position=
"attributes"
>
<attribute
name=
"invisible"
>
1
</attribute>
</xpath>
<xpath
expr=
"//field[@name='sh_lead_ids']"
position=
"attributes"
>
<attribute
name=
"invisible"
>
1
</attribute>
</xpath>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment