[IMP] im_livechat: give res_model_id instead of res_model submit rating

This commit is contained in:
Rohan Patel
2017-01-24 09:02:10 +01:00
committed by Jérome Maes
parent 02a5160f54
commit 7b7995e301
+2 -1
View File
@@ -90,9 +90,10 @@ class LivechatController(http.Controller):
'feedback': reason,
}
if not channel.rating_ids:
res_model_id = request.env['ir.model'].sudo().search([('model', '=', channel._name)], limit=1).id
values.update({
'res_id': channel.id,
'res_model': 'mail.channel',
'res_model_id': res_model_id,
})
# find the partner (operator)
if channel.channel_partner_ids: