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
d665d15f
authored
Mar 06, 2023
by
Arturo Jasso Origel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
se agregaron cambios y permisos
parent
34a518c5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
32 deletions
+39
-32
helpdesk_morsa/__manifest__.py
+1
-1
helpdesk_morsa/models/helpdesk_ticket.py
+10
-2
helpdesk_morsa/security/groups.xml
+5
-26
helpdesk_morsa/security/ir.model.access.csv
+19
-1
helpdesk_morsa/views/portal/portal_tickets_emergency.xml
+1
-1
helpdesk_morsa/views/portal/portal_tickets_erp.xml
+3
-1
No files found.
helpdesk_morsa/__manifest__.py
View file @
d665d15f
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
"sale"
,
"sale"
,
],
],
"data"
:
[
"data"
:
[
'security/groups.xml'
,
'security/ir.model.access.csv'
,
'security/ir.model.access.csv'
,
#'security/groups.xml',
'data/region.xml'
,
'data/region.xml'
,
'data/helpdesk_team.xml'
,
'data/helpdesk_team.xml'
,
'data/helpdesk_stage.xml'
,
'data/helpdesk_stage.xml'
,
...
...
helpdesk_morsa/models/helpdesk_ticket.py
View file @
d665d15f
...
@@ -320,12 +320,14 @@ class HelpdeskTicket(models.Model):
...
@@ -320,12 +320,14 @@ class HelpdeskTicket(models.Model):
})
})
def
write
(
self
,
vals
):
def
write
(
self
,
vals
):
if
"stage_id"
in
vals
:
if
"stage_id"
in
vals
:
if
self
.
description
==
'<p><br></p>'
or
self
.
description
==
False
:
if
self
.
description
==
'<p><br></p>'
or
self
.
description
==
False
:
raise
ValidationError
(
_
(
"Para cambiar de etapa, es necesario agregar una descripción"
))
raise
ValidationError
(
_
(
"Para cambiar de etapa, es necesario agregar una descripción"
))
if
'description'
in
vals
and
vals
[
"description"
]
!=
""
and
vals
[
'description'
]
!=
'<p><br></p>'
and
(
self
.
is_support
==
True
or
self
.
is_erp
==
True
or
self
.
is_emergency
==
True
):
if
'description'
in
vals
and
(
vals
[
"description"
]
!=
""
or
self
.
description
!=
False
)
and
vals
[
'description'
]
!=
'<p><br></p>'
and
(
self
.
is_support
==
True
or
self
.
is_erp
==
True
or
self
.
is_emergency
==
True
):
min_description
=
int
(
self
.
env
[
'ir.config_parameter'
]
.
sudo
()
.
get_param
(
'helpdesk_morsa.description_min_lenght'
))
min_description
=
int
(
self
.
env
[
'ir.config_parameter'
]
.
sudo
()
.
get_param
(
'helpdesk_morsa.description_min_lenght'
))
if
len
(
vals
[
'description'
])
-
11
<
min_description
:
description
=
self
.
get_description_len
(
vals
[
"description"
])
if
len
(
description
)
-
11
<
min_description
:
raise
ValidationError
(
_
(
"Favor de agregar al menos "
+
str
(
min_description
)
+
" caracteres a la descripción"
))
raise
ValidationError
(
_
(
"Favor de agregar al menos "
+
str
(
min_description
)
+
" caracteres a la descripción"
))
return
super
(
HelpdeskTicket
,
self
)
.
write
(
vals
)
return
super
(
HelpdeskTicket
,
self
)
.
write
(
vals
)
...
@@ -335,6 +337,12 @@ class HelpdeskTicket(models.Model):
...
@@ -335,6 +337,12 @@ class HelpdeskTicket(models.Model):
raise
ValidationError
(
_
(
"Para cambiar de etapa, es necesario agregar una descripción"
))
raise
ValidationError
(
_
(
"Para cambiar de etapa, es necesario agregar una descripción"
))
else
:
else
:
return
super
(
HelpdeskTicket
,
self
)
.
action_approve
()
return
super
(
HelpdeskTicket
,
self
)
.
action_approve
()
def
get_description_len
(
self
,
description
):
try
:
return
len
(
description
)
except
Exception
as
e
:
return
0
...
...
helpdesk_morsa/security/groups.xml
View file @
d665d15f
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<odoo>
<data
noupdate=
"1"
>
<data
noupdate=
"1"
>
<record
id=
"user_ti"
model=
"res.groups"
>
<field
name=
"category_id"
ref=
"sh_all_in_one_helpdesk.module_helpdesk_category"
/>
<field
name=
"name"
>
Usuario de TI
</field>
<field
name=
"implied_ids"
eval=
"[(6,0,[ref('sh_all_in_one_helpdesk.helpdesk_group_user')])]"
/>
</record>
<record
id=
"captain_ti"
model=
"res.groups"
>
<field
name=
"category_id"
ref=
"sh_all_in_one_helpdesk.module_helpdesk_category"
/>
<field
name=
"name"
>
Capitan del Equipo TI
</field>
<field
name=
"implied_ids"
eval=
"[(6,0,[ref('sh_all_in_one_helpdesk.helpdesk_group_team_leader'),ref('user_ti')])]"
/>
</record>
<record
id=
"
admin_ti
"
model=
"res.groups"
>
<record
id=
"
ticket_auditor
"
model=
"res.groups"
>
<field
name=
"category_id"
ref=
"sh_all_in_one_helpdesk.module_helpdesk_category"
/>
<field
name=
"category_id"
ref=
"sh_all_in_one_helpdesk.module_helpdesk_category"
/>
<field
name=
"name"
>
Administrador de TI
</field>
<field
name=
"name"
>
Auditor de tickets
</field>
<field
name=
"implied_ids"
eval=
"[(6,0,[ref('sh_all_in_one_helpdesk.helpdesk_group_manager'),ref('captain_ti')])]"
/>
</record>
</record>
<record
id=
"only_see_ti"
model=
"ir.rule"
>
<field
name=
"name"
>
Ver tickets de TI
</field>
<field
name=
"model_id"
ref=
"sh_all_in_one_helpdesk.model_helpdesk_ticket"
/>
<field
name=
"groups"
eval=
"[(6,0,[ref('user_ti'),ref('captain_ti'),ref('admin_ti'),])]"
/>
<field
name=
"perm_read"
eval=
"1"
/>
<field
name=
"perm_write"
eval=
"1"
/>
<field
name=
"perm_create"
eval=
"1"
/>
<field
name=
"perm_unlink"
eval=
"0"
/>
<field
name=
"domain_force"
>
[('team_id.is_support_team','=',True)]
</field>
</record>
</data>
</data>
</odoo>
</odoo>
\ No newline at end of file
helpdesk_morsa/security/ir.model.access.csv
View file @
d665d15f
...
@@ -12,9 +12,27 @@ user_region_helpdesk,region.helpdesk.user,model_region_helpdesk,base.group_user,
...
@@ -12,9 +12,27 @@ user_region_helpdesk,region.helpdesk.user,model_region_helpdesk,base.group_user,
admin_region_helpdesk,region.helpdesk.admin,model_region_helpdesk,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1
admin_region_helpdesk,region.helpdesk.admin,model_region_helpdesk,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1
user_erp_system,erp.system.user,model_erp_system,base.group_user,,1,0,0,0
user_erp_system,erp.system.user,model_erp_system,base.group_user,,1,0,0,0
admin_erp_system,
region.helpdes
.admin,model_erp_system,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1
admin_erp_system,
erp.system
.admin,model_erp_system,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1
user_account_move,account.move.user,account.model_account_move,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
user_account_move,account.move.user,account.model_account_move,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
user_crm_lead,crm.lead.user,crm.model_crm_lead,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
user_crm_lead,crm.lead.user,crm.model_crm_lead,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
user_purchase_order,purchase.order.user,purchase.model_purchase_order,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
user_purchase_order,purchase.order.user,purchase.model_purchase_order,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
user_sale_order,sale.order.user,sale.model_sale_order,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
user_sale_order,sale.order.user,sale.model_sale_order,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
auditor_helpdesk_ticket,helpdeks.ticket.auditor,sh_all_in_one_helpdesk.model_helpdesk_ticket,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_helpdesk_category,helpdesk_category.auditor,sh_all_in_one_helpdesk.model_helpdesk_category,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_helpdesk_team,helpdeks.team.auditor,sh_all_in_one_helpdesk.model_helpdesk_team,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_helpdesk_stages,helpdeks.stages.auditor,sh_all_in_one_helpdesk.model_helpdesk_stages,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_helpdesk_tags,helpdeks.tags.auditor,sh_all_in_one_helpdesk.model_helpdesk_tags,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_helpdesk_priority,helpdeks.priority.auditor,sh_all_in_one_helpdesk.model_helpdesk_priority,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_helpdesk_subcategory,helpdeks.subcategory.auditor,sh_all_in_one_helpdesk.model_helpdesk_subcategory,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_ticket_dashboard,ticket.dashboard.auditor,sh_all_in_one_helpdesk.model_ticket_dashboard,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_helpdesk_sub_type,helpdesk.sub.type.auditor,sh_all_in_one_helpdesk.model_helpdesk_sub_type,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_helpdesk_ticket_type,helpdeks.ticket.type.auditor,sh_all_in_one_helpdesk.model_helpdesk_ticket_type,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_erp_modules,erp.modules.auditor,model_erp_modules,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_erp_system,erp.system.auditor,model_erp_system,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_region_helpdesk,region.helpdesk.auditor,model_region_helpdesk,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_ticket_reason,ticket.reason.auditor,model_ticket_reason,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_warehouse_helpdesk,warehouse.helpdesk.auditor,model_warehouse_helpdesk,helpdesk_morsa.ticket_auditor,1,0,0,0
helpdesk_morsa/views/portal/portal_tickets_emergency.xml
View file @
d665d15f
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
<em
t-else=
""
>
Ticket
</em>
<em
t-else=
""
>
Ticket
</em>
</a>
</a>
</td>
</td>
<td><span
t-field=
"t.create_date"
t-options=
'{"widget": "date"}'
/></td>
<td><span
t-field=
"t.create_date"
/></td>
<td><span
t-field=
"t.write_date"
t-options=
'{"widget": "date"}'
/></td>
<td><span
t-field=
"t.write_date"
t-options=
'{"widget": "date"}'
/></td>
<td><span
t-field=
"t.ticket_type"
/></td>
<td><span
t-field=
"t.ticket_type"
/></td>
<td><span
t-field=
"t.stage_id"
/></td>
<td><span
t-field=
"t.stage_id"
/></td>
...
...
helpdesk_morsa/views/portal/portal_tickets_erp.xml
View file @
d665d15f
...
@@ -214,6 +214,7 @@
...
@@ -214,6 +214,7 @@
</th>
</th>
<th>
Fecha de creación
</th>
<th>
Fecha de creación
</th>
<th>
Última actualización
</th>
<th>
Última actualización
</th>
<th>
Prioridad
</th>
<th>
Módulo
</th>
<th>
Módulo
</th>
<th>
Sucursal
</th>
<th>
Sucursal
</th>
<th>
Estado
</th>
<th>
Estado
</th>
...
@@ -228,8 +229,9 @@
...
@@ -228,8 +229,9 @@
<em
t-else=
""
>
Ticket
</em>
<em
t-else=
""
>
Ticket
</em>
</a>
</a>
</td>
</td>
<td><span
t-field=
"t.create_date"
t-options=
'{"widget": "date"}'
/></td>
<td><span
t-field=
"t.create_date"
/></td>
<td><span
t-field=
"t.write_date"
t-options=
'{"widget": "date"}'
/></td>
<td><span
t-field=
"t.write_date"
t-options=
'{"widget": "date"}'
/></td>
<td><span
t-field=
"t.priority"
/></td>
<td><span
t-field=
"t.erp_id"
/></td>
<td><span
t-field=
"t.erp_id"
/></td>
<td><span
t-field=
"t.warehouse_id"
/></td>
<td><span
t-field=
"t.warehouse_id"
/></td>
<td><span
t-field=
"t.stage_id"
/></td>
<td><span
t-field=
"t.stage_id"
/></td>
...
...
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