From 80caa08f8b2f501787cb6ffc824d2dafb690b8b8 Mon Sep 17 00:00:00 2001 From: Waleed Mohsen Date: Fri, 19 Apr 2019 20:51:51 +0300 Subject: [PATCH] An error when try to merge ticket (ticket drop down list) website_support V11.0.1.6.1 I got the below error once try to select the ticket to merge: Error: Uncaught TypeError: value.split is not a function http://localhost:8069/web/static/src/js/fields/relational_fields.js:273 Traceback: TypeError: value.split is not a function at Class.getDisplayName (http://localhost:8069/web/static/src/js/fields/relational_fields.js:273:22) at http://localhost:8069/web/static/src/js/fields/relational_fields.js:393:33 at Function..map._.collect (http://localhost:8069/web/static/lib/underscore/underscore.js:164:24) at Object. (http://localhost:8069/web/static/src/js/fields/relational_fields.js:392:32) at Object. (http://localhost:8069/web/static/lib/jquery/jquery.js:3276:89) at fire (http://localhost:8069/web/static/lib/jquery/jquery.js:3119:58) at Object.fireWith [as resolveWith] (http://localhost:8069/web/static/lib/jquery/jquery.js:3231:49) at Object.deferred.(anonymous function) [as resolve] (http://localhost:8069/web/static/lib/jquery/jquery.js:3321:62) at Object. (http://localhost:8069/web/static/src/js/services/ajax_service.js:13:33) at Object. (http://localhost:8069/web/static/lib/jquery/jquery.js:3276:89) I discovered that the subject field of the ticket is empty, I added Required = true to subject field. --- website_support/models/website_support_ticket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website_support/models/website_support_ticket.py b/website_support/models/website_support_ticket.py index b48346794..3b4b6898b 100644 --- a/website_support/models/website_support_ticket.py +++ b/website_support/models/website_support_ticket.py @@ -67,7 +67,7 @@ def _default_approval_id(self): support_email = fields.Char(string="Support Email") category = fields.Many2one('website.support.ticket.categories', string="Category", track_visibility='onchange') sub_category_id = fields.Many2one('website.support.ticket.subcategory', string="Sub Category") - subject = fields.Char(string="Subject") + subject = fields.Char(string="Subject", required = True) description = fields.Text(string="Description") state = fields.Many2one('website.support.ticket.states', group_expand='_read_group_state', default=_default_state, string="State") @@ -799,4 +799,4 @@ def send_reply(self): else: #Change the ticket state to staff replied staff_replied = self.env['ir.model.data'].get_object('website_support','website_ticket_state_staff_replied') - self.ticket_id.state = staff_replied.id \ No newline at end of file + self.ticket_id.state = staff_replied.id