diff --git a/helpdesk_mgmt/models/helpdesk_ticket.py b/helpdesk_mgmt/models/helpdesk_ticket.py index 6e916064e7..7c52089297 100644 --- a/helpdesk_mgmt/models/helpdesk_ticket.py +++ b/helpdesk_mgmt/models/helpdesk_ticket.py @@ -6,7 +6,7 @@ class HelpdeskTicket(models.Model): _name = "helpdesk.ticket" _description = "Helpdesk Ticket" _rec_name = "number" - _order = "priority desc, number desc, id desc" + _order = "priority desc, sequence, number desc, id desc" _mail_post_access = "read" _inherit = ["mail.thread.cc", "mail.activity.mixin", "portal.mixin"] @@ -94,6 +94,11 @@ def _read_group_stage_ids(self, stages, domain, order): ("blocked", "Blocked"), ], ) + sequence = fields.Integer( + index=True, + default=10, + help="Gives the sequence order when displaying a list of tickets.", + ) active = fields.Boolean(default=True) def name_get(self): diff --git a/helpdesk_mgmt/views/helpdesk_ticket_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_views.xml index a0d5970e50..ceda539651 100644 --- a/helpdesk_mgmt/views/helpdesk_ticket_views.xml +++ b/helpdesk_mgmt/views/helpdesk_ticket_views.xml @@ -178,6 +178,7 @@ widget="many2many_tags" options="{'no_create_edit': True, 'color_field': 'color',}" /> + @@ -210,20 +211,34 @@ helpdesk.ticket - - - - - + + + + + + + + - - + + + @@ -238,6 +253,7 @@ +