|
@ -9,14 +9,16 @@ class TicketGroupBy(http.Controller): |
|
|
group_value = kwargs.get("search_value") |
|
|
group_value = kwargs.get("search_value") |
|
|
if group_value == '0': |
|
|
if group_value == '0': |
|
|
context = [] |
|
|
context = [] |
|
|
tickets = request.env["help.ticket"].search([('user_id', '=', request.env.user.id)]) |
|
|
tickets = request.env["help.ticket"].search( |
|
|
|
|
|
[('user_id', '=', request.env.user.id)]) |
|
|
context.append(tickets) |
|
|
context.append(tickets) |
|
|
if group_value == '1': |
|
|
if group_value == '1': |
|
|
context = [] |
|
|
context = [] |
|
|
stage_ids = request.env['ticket.stage'].search([]) |
|
|
stage_ids = request.env['ticket.stage'].search([]) |
|
|
for stage in stage_ids: |
|
|
for stage in stage_ids: |
|
|
ticket_ids = request.env['help.ticket'].search([ |
|
|
ticket_ids = request.env['help.ticket'].search([ |
|
|
('stage_id', '=', stage.id), ('user_id', '=', request.env.user.id) |
|
|
('stage_id', '=', stage.id), |
|
|
|
|
|
('user_id', '=', request.env.user.id) |
|
|
]) |
|
|
]) |
|
|
if ticket_ids: |
|
|
if ticket_ids: |
|
|
context.append({ |
|
|
context.append({ |
|
@ -28,7 +30,8 @@ class TicketGroupBy(http.Controller): |
|
|
type_ids = request.env['helpdesk.types'].search([]) |
|
|
type_ids = request.env['helpdesk.types'].search([]) |
|
|
for types in type_ids: |
|
|
for types in type_ids: |
|
|
ticket_ids_1 = request.env['help.ticket'].search([ |
|
|
ticket_ids_1 = request.env['help.ticket'].search([ |
|
|
('ticket_type', '=', types.id), ('user_id', '=', request.env.user.id) |
|
|
('ticket_type', '=', types.id), |
|
|
|
|
|
('user_id', '=', request.env.user.id) |
|
|
]) |
|
|
]) |
|
|
if ticket_ids_1: |
|
|
if ticket_ids_1: |
|
|
context.append({ |
|
|
context.append({ |
|
|