[FIX] im_livechat: match_rule() expects an ID, not a record

This commit is contained in:
Olivier Dony
2015-10-29 08:58:11 +01:00
parent efbdac1efb
commit 6aa27e644f
@@ -199,7 +199,7 @@ class ImLivechatChannel(models.Model):
if country_code:
country_ids = self.env['res.country'].sudo().search([('code', '=', country_code)])
if country_ids:
country_id = country_ids[0]
country_id = country_ids[0].id
# extract url
url = request.httprequest.headers.get('Referer') or request.httprequest.base_url
# find the match rule for the given country and url